@matheusbsbs / matheus-bagliano / commits / 7337b138bf
Fork 0

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 <eli@barzilay.org> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael J Gruber committed Mar 22, 2010 at 14:36 UTC 7337b138bf47a8f7d8da400710014006386d31cc
1 file changed +1 -1
builtin-rev-list.c
+1 -1
@@ -313,7 +313,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
313
314 git_config(git_default_config, NULL);
315 init_revisions(&revs, prefix);
316 - revs.abbrev = 0;
316 + revs.abbrev = DEFAULT_ABBREV;
317 revs.commit_format = CMIT_FMT_UNSPECIFIED;
318 argc = setup_revisions(argc, argv, &revs, NULL);
319