Thread (11 messages) flat view 11 messages, 3 authors, 2016-06-15

Re: Possible bug with `export-subst' attribute

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:11

Possibly related (same subject, not in this thread)

Jonathan Nieder [off-list ref] writes:
My bad.  Would something like this fix it?

-- 8< --
Subject: archive, commit: use --abbrev by default again

v1.7.1.1~17^2~3 (pretty: Respect --abbrev option, 2010-05-03) taught
git log --format=%h to respect the --abbrev option instead of
always abbreviating, with the side-effect that we have to pay
attention to the abbrev setting now.

For example, the "git archive" export-subst feature and the
informational line printed by "git commit" are using unabbreviated
object names now, the former because full object names are the low-level
default, the latter because it was first written to imitate plumbing.

Fix them.  While at it, remove a similar confusing assignment of 0 to
rev.abbrev in "git checkout" which had no effect.

Signed-off-by: Jonathan Nieder <redacted>
The ones to archive and checkout I understand, but what effect does the
one to commit.c::print_summary() have?
quoted hunk
diff --git i/builtin/commit.c w/builtin/commit.c
index a78dbd8..ae4831e 100644
--- i/builtin/commit.c
+++ w/builtin/commit.c
@@ -1163,7 +1163,7 @@ 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.abbrev = DEFAULT_ABBREV;
 	rev.diff = 1;
 	rev.diffopt.output_format =
 		DIFF_FORMAT_SHORTSTAT | DIFF_FORMAT_SUMMARY;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help