From: Michael J Gruber Date: Mon, 22 Mar 2010 13:36:30 +0000 (+0100) Subject: rev-list: use default abbrev length when abbrev-commit is in effect X-Git-Tag: v1.7.1-rc0~12^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7337b138bf47a8f7d8da400710014006386d31cc;p=git.git 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 Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 5679170e8..eb8e2c205 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -313,7 +313,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) git_config(git_default_config, NULL); init_revisions(&revs, prefix); - revs.abbrev = 0; + revs.abbrev = DEFAULT_ABBREV; revs.commit_format = CMIT_FMT_UNSPECIFIED; argc = setup_revisions(argc, argv, &revs, NULL);