From dcbeac48a7e61154c53ae800ea224607c1f7d52a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 27 Jul 2010 13:37:07 -0500 Subject: checkout, commit: remove confusing assignments to rev.abbrev 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano diff --git a/builtin/checkout.c b/builtin/checkout.c index 1994be9..eef2b48 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -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"); diff --git a/builtin/commit.c b/builtin/commit.c index a78dbd8..279cfc1 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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; -- cgit v0.10.2-6-g49f6