Skip to content

Commit 913419f

Browse files
author
Junio C Hamano
committed
diff --abbrev: document --abbrev=<n> form.
It was implemented there but was not advertised. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 47dd0d5 commit 913419f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Documentation/diff-options.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
object name of pre- and post-image blob on the "index"
1919
line when generating a patch format output.
2020

21-
--abbrev::
21+
--abbrev[=<n>]::
2222
Instead of showing the full 40-byte hexadecimal object
2323
name in diff-raw format output and diff-tree header
24-
lines, show only handful prefix. This is independent of
25-
--full-index option above, which controls the diff-patch
26-
output format.
24+
lines, show only handful dhexigits prefix. This is
25+
independent of --full-index option above, which controls
26+
the diff-patch output format. Non default number of
27+
digits can be specified with --abbrev=<n>.
2728

2829
-B::
2930
Break complete rewrite changes into pairs of delete and create.

diff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ extern void diffcore_std_no_resolve(struct diff_options *);
103103
" --name-only show only names of changed files.\n" \
104104
" --name-status show names and status of changed files.\n" \
105105
" --full-index show full object name on index lines.\n" \
106-
" --abbrev abbreviate object names in diff-tree header and diff-raw.\n" \
106+
" --abbrev=<n> abbreviate object names in diff-tree header and diff-raw.\n" \
107107
" -R swap input file pairs.\n" \
108108
" -B detect complete rewrites.\n" \
109109
" -M detect renames.\n" \

0 commit comments

Comments
 (0)