Skip to content

Commit 7337b13

Browse files
Michael J Grubergitster
authored andcommitted
rev-list: use default abbrev length when abbrev-commit is in effect
Currently, rev-list has a default of "0" for abbrev which means that switching on abbreviations with --abbrev-commit has no visible effect, even though the option is documented. Set abbrev to DEFAULT_ABBREV so that --abbrev-commit has the same effect as for log. Reported-by: Eli Barzilay <[email protected]> Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b3dcfe commit 7337b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-rev-list.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
313313

314314
git_config(git_default_config, NULL);
315315
init_revisions(&revs, prefix);
316-
revs.abbrev = 0;
316+
revs.abbrev = DEFAULT_ABBREV;
317317
revs.commit_format = CMIT_FMT_UNSPECIFIED;
318318
argc = setup_revisions(argc, argv, &revs, NULL);
319319

0 commit comments

Comments
 (0)