Skip to content

Commit

Permalink
checkout, commit: remove confusing assignments to rev.abbrev
Browse files Browse the repository at this point in the history
Since they do not precede setup_revisions, these assignments of 0 to
rev.abbrev have no effect.

v1.7.1.1~17^2~3 (2010-05-03) taught the log --format=%h machinery
to respect --abbrev instead of always abbreviating, so we have to pay
attention to the abbrev setting now.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Jul 27, 2010
1 parent 35039ce commit dcbeac4
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion builtin/checkout.c
Original file line number Diff line number Diff line change
@@ -279,7 +279,6 @@ static void show_local_changes(struct object *head)
struct rev_info rev;
/* I think we want full paths, even if we're in a subdirectory. */
init_revisions(&rev, NULL);
rev.abbrev = 0;
rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
if (diff_setup_done(&rev.diffopt) < 0)
die("diff_setup_done failed");
1 change: 0 additions & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
@@ -1163,7 +1163,6 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
init_revisions(&rev, prefix);
setup_revisions(0, NULL, &rev, NULL);

rev.abbrev = 0;
rev.diff = 1;
rev.diffopt.output_format =
DIFF_FORMAT_SHORTSTAT | DIFF_FORMAT_SUMMARY;

0 comments on commit dcbeac4

Please sign in to comment.