Browse Source

Merge branch 'jc/abbrev-doc'

The documentation on the "--abbrev=<n>" option did not say the
output may be longer than "<n>" hexdigits, which has been
clarified.

* jc/abbrev-doc:
  doc: clarify that --abbrev=<n> is about the minimum length
maint
Junio C Hamano 4 years ago
parent
commit
ee13bebbd5
  1. 3
      Documentation/diff-options.txt
  2. 4
      Documentation/git-blame.txt
  3. 8
      Documentation/git-branch.txt
  4. 5
      Documentation/git-ls-files.txt
  5. 3
      Documentation/git-ls-tree.txt
  6. 6
      Documentation/pretty-options.txt

3
Documentation/diff-options.txt

@ -449,7 +449,8 @@ endif::git-format-patch[]
--abbrev[=<n>]:: --abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object Instead of showing the full 40-byte hexadecimal object
name in diff-raw format output and diff-tree header name in diff-raw format output and diff-tree header
lines, show only a partial prefix. lines, show the shortest prefix that is at least '<n>'
hexdigits long that uniquely refers the object.
In diff-patch output format, `--full-index` takes higher In diff-patch output format, `--full-index` takes higher
precedence, i.e. if `--full-index` is specified, full blob precedence, i.e. if `--full-index` is specified, full blob
names will be shown regardless of `--abbrev`. names will be shown regardless of `--abbrev`.

4
Documentation/git-blame.txt

@ -87,7 +87,9 @@ include::blame-options.txt[]


--abbrev=<n>:: --abbrev=<n>::
Instead of using the default 7+1 hexadecimal digits as the Instead of using the default 7+1 hexadecimal digits as the
abbreviated object name, use <n>+1 digits. Note that 1 column abbreviated object name, use <m>+1 digits, where <m> is at
least <n> but ensures the commit object names are unique.
Note that 1 column
is used for a caret to mark the boundary commit. is used for a caret to mark the boundary commit.





8
Documentation/git-branch.txt

@ -9,7 +9,7 @@ SYNOPSIS
-------- --------
[verse] [verse]
'git branch' [--color[=<when>] | --no-color] [--show-current] 'git branch' [--color[=<when>] | --no-color] [--show-current]
[-v [--abbrev=<length> | --no-abbrev]] [-v [--abbrev=<n> | --no-abbrev]]
[--column[=<options>] | --no-column] [--sort=<key>] [--column[=<options>] | --no-column] [--sort=<key>]
[--merged [<commit>]] [--no-merged [<commit>]] [--merged [<commit>]] [--no-merged [<commit>]]
[--contains [<commit>]] [--no-contains [<commit>]] [--contains [<commit>]] [--no-contains [<commit>]]
@ -194,8 +194,10 @@ This option is only applicable in non-verbose mode.
Be more quiet when creating or deleting a branch, suppressing Be more quiet when creating or deleting a branch, suppressing
non-error messages. non-error messages.


--abbrev=<length>:: --abbrev=<n>::
Alter the sha1's minimum display length in the output listing. In the verbose listing that show the commit object name,
show the shortest prefix that is at least '<n>' hexdigits
long that uniquely refers the object.
The default value is 7 and can be overridden by the `core.abbrev` The default value is 7 and can be overridden by the `core.abbrev`
config option. config option.



5
Documentation/git-ls-files.txt

@ -19,7 +19,7 @@ SYNOPSIS
[--exclude-standard] [--exclude-standard]
[--error-unmatch] [--with-tree=<tree-ish>] [--error-unmatch] [--with-tree=<tree-ish>]
[--full-name] [--recurse-submodules] [--full-name] [--recurse-submodules]
[--abbrev] [--] [<file>...] [--abbrev[=<n>]] [--] [<file>...]


DESCRIPTION DESCRIPTION
----------- -----------
@ -153,7 +153,8 @@ a space) at the start of each line:


--abbrev[=<n>]:: --abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object Instead of showing the full 40-byte hexadecimal object
lines, show only a partial prefix. lines, show the shortest prefix that is at least '<n>'
hexdigits long that uniquely refers the object.
Non default number of digits can be specified with --abbrev=<n>. Non default number of digits can be specified with --abbrev=<n>.


--debug:: --debug::

3
Documentation/git-ls-tree.txt

@ -62,7 +62,8 @@ OPTIONS


--abbrev[=<n>]:: --abbrev[=<n>]::
Instead of showing the full 40-byte hexadecimal object Instead of showing the full 40-byte hexadecimal object
lines, show only a partial prefix. lines, show the shortest prefix that is at least '<n>'
hexdigits long that uniquely refers the object.
Non default number of digits can be specified with --abbrev=<n>. Non default number of digits can be specified with --abbrev=<n>.


--full-name:: --full-name::

6
Documentation/pretty-options.txt

@ -16,9 +16,9 @@ configuration (see linkgit:git-config[1]).


--abbrev-commit:: --abbrev-commit::
Instead of showing the full 40-byte hexadecimal commit object Instead of showing the full 40-byte hexadecimal commit object
name, show only a partial prefix. Non default number of name, show a prefix that names the object uniquely.
digits can be specified with "--abbrev=<n>" (which also modifies "--abbrev=<n>" (which also modifies diff output, if it is displayed)
diff output, if it is displayed). option can be used to specify the minimum length of the prefix.
+ +
This should make "--pretty=oneline" a whole lot more readable for This should make "--pretty=oneline" a whole lot more readable for
people using 80-column terminals. people using 80-column terminals.

Loading…
Cancel
Save