Merge branch 'tz/doc-pack-refs-and-refs-fixes'

Doc updates.

* tz/doc-pack-refs-and-refs-fixes:
  doc/refs: backtick-quote commands and options consistently
  doc/pack-refs: convert synopsis and options to new style
main
Junio C Hamano 2026-09-17 09:48:17 -07:00
commit 2a41443dc8
3 changed files with 16 additions and 16 deletions

View File

@ -7,8 +7,8 @@ git-pack-refs - Pack heads and tags for efficient repository access

SYNOPSIS
--------
[verse]
'git pack-refs' [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>]
[synopsis]
git pack-refs [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>]

DESCRIPTION
-----------
@ -52,8 +52,8 @@ BUGS
----

Older documentation written before the packed-refs mechanism was
introduced may still say things like ".git/refs/heads/<branch> file
exists" when it means "branch <branch> exists".
introduced may still say things like ".git/refs/heads/_<branch>_ file
exists" when it means "branch _<branch>_ exists".


GIT

View File

@ -54,40 +54,40 @@ These limitations may eventually be lifted.
`verify`::
Verify reference database consistency.

list::
`list`::
List references in the repository with support for filtering,
formatting, and sorting. This subcommand is an alias for
linkgit:git-for-each-ref[1] and offers identical functionality.

exists::
`exists`::
Check whether the given reference exists. Returns an exit code of 0 if
it does, 2 if it is missing, and 1 in case looking up the reference
failed with an error other than the reference being missing. This does
not verify whether the reference resolves to an actual object.

optimize::
`optimize`::
Optimizes references to improve repository performance and reduce disk
usage. This subcommand is an alias for linkgit:git-pack-refs[1] and
offers identical functionality.

create::
`create`::
Create the given reference, which must not already exist, pointing at
`<new-value>`.

delete::
`delete`::
Delete the given reference. This subcommand mirrors `git update-ref -d`
(see linkgit:git-update-ref[1]). When `<old-value>` is given, the
reference is only deleted after verifying that it currently contains
`<old-value>`.

update::
`update`::
Update the given reference to point at `<new-value>`. If `<old-value>`
is given, the reference is only updated after verifying that it
currently contains `<old-value>`. As a special case, an all-zeroes
`<new-value>` deletes the branch, whereas an all-zeroes `<old-value>`
ensures that the branch does not yet exist.

rename::
`rename`::
Rename the reference `<oldref>` to `<newref>`. The old reference must
exist and the new reference must not yet exist, and both must have a
well-formed name (see linkgit:git-check-ref-format[1]).

View File

@ -1,4 +1,4 @@
--all::
`--all`::

The command by default packs all tags and refs that are already
packed, and leaves other refs
@ -8,12 +8,12 @@ This option causes all refs to be packed as well, with the exception
of hidden refs, broken refs, and symbolic refs. Useful for a repository
with many branches of historical interests.

--no-prune::
`--no-prune`::

The command usually removes loose refs under `$GIT_DIR/refs`
hierarchy after packing them. This option tells it not to.

--auto::
`--auto`::

Pack refs as needed depending on the current state of the ref database. The
behavior depends on the ref format used by the repository and may change in the
@ -29,7 +29,7 @@ future.
maintains the property that N is at least twice as big as N+1. Only
tables that violate this property are compacted.

--include <pattern>::
`--include <pattern>`::

Pack refs based on a `glob(7)` pattern. Repetitions of this option
accumulate inclusion patterns. If a ref is both included in `--include` and
@ -38,7 +38,7 @@ tags from being included by default. Symbolic refs and broken refs will never
be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear
and reset the list of patterns.

--exclude <pattern>::
`--exclude <pattern>`::

Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option
accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of