From: Junio C Hamano Date: Mon, 26 Jul 2010 06:01:57 GMT Subject: Re: Possible bug with `export-subst' attribute Message-ID: <7vbp9uaii2.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100725221539.GA21813@burratino> Jonathan Nieder 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 The ones to archive and checkout I understand, but what effect does the one to commit.c::print_summary() have? > 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;