Skip to content

Commit dcbeac4

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 35039ce commit dcbeac4

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

builtin/checkout.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ static void show_local_changes(struct object *head)
279279
struct rev_info rev;
280280
/* I think we want full paths, even if we're in a subdirectory. */
281281
init_revisions(&rev, NULL);
282-
rev.abbrev = 0;
283282
rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
284283
if (diff_setup_done(&rev.diffopt) < 0)
285284
die("diff_setup_done failed");

builtin/commit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
11631163
init_revisions(&rev, prefix);
11641164
setup_revisions(0, NULL, &rev, NULL);
11651165

1166-
rev.abbrev = 0;
11671166
rev.diff = 1;
11681167
rev.diffopt.output_format =
11691168
DIFF_FORMAT_SHORTSTAT | DIFF_FORMAT_SUMMARY;

0 commit comments

Comments
 (0)