Re: Possible bug with `export-subst' attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> 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 <jrnieder@xxxxxxxxx>

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;


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]