Skip to content

Commit

Permalink
rev-list: use default abbrev length when abbrev-commit is in effect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Mar 24, 2010
1 parent 0b3dcfe commit 7337b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7337b13

Please sign in to comment.