path: root/Documentation/git-branch.txt
diff options
authorJunio C Hamano <>2020-11-04 22:01:37 (GMT)
committerJunio C Hamano <>2020-11-04 22:04:44 (GMT)
commitcda34e0d0cc3e0b53e6c496c56e07e34c339263f (patch)
tree3cc01c93d956ceb686e5fe76950e3cbba645d8cc /Documentation/git-branch.txt
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
doc: clarify that --abbrev=<n> is about the minimum length
Early text written in 2006 explains the "--abbrev=<n>" option to "show only a partial prefix", without saying that the length of the partial prefix is not necessarily the number given to the option to ensure that the output names the object uniquely. Update documentation for the diff family of commands, "blame", "branch --verbose", "ls-files" and "ls-tree" to stress that the short prefix must uniquely refer to an object, and <n> is merely the mininum number of hexdigits used in the prefix. Helped-by: Derrick Stolee <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-branch.txt')
1 files changed, 5 insertions, 3 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index ace4ad3..adaa178 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -9,7 +9,7 @@ SYNOPSIS
'git branch' [--color[=<when>] | --no-color] [--show-current]
- [-v [--abbrev=<length> | --no-abbrev]]
+ [-v [--abbrev=<n> | --no-abbrev]]
[--column[=<options>] | --no-column] [--sort=<key>]
[--merged [<commit>]] [--no-merged [<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
non-error messages.
- 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`
config option.