From cda34e0d0cc3e0b53e6c496c56e07e34c339263f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 4 Nov 2020 14:01:37 -0800 Subject: doc: clarify that --abbrev= is about the minimum length Early text written in 2006 explains the "--abbrev=" 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 is merely the mininum number of hexdigits used in the prefix. Helped-by: Derrick Stolee Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation/diff-options.txt') diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 573fb9bb71..706c69bc82 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -446,7 +446,8 @@ endif::git-format-patch[] --abbrev[=]:: Instead of showing the full 40-byte hexadecimal object 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 '' + hexdigits long that uniquely refers the object. In diff-patch output format, `--full-index` takes higher precedence, i.e. if `--full-index` is specified, full blob names will be shown regardless of `--abbrev`. -- cgit v1.3