Re: [PATCH] branch: honor --abbrev/--no-abbrev in --list mode

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

 



Jakub Narębski <jnareb@xxxxxxxxx> writes:

> W dniu 08.03.2017 o 23:16, Junio C Hamano pisze:
>  
>> diff --git a/builtin/branch.c b/builtin/branch.c
>> index cbaa6d03c0..537c47811a 100644
>> --- a/builtin/branch.c
>> +++ b/builtin/branch.c
>> @@ -335,9 +335,18 @@ static char *build_format(struct ref_filter *filter, int maxwidth, const char *r
>>  		    branch_get_color(BRANCH_COLOR_CURRENT));
>>  
>>  	if (filter->verbose) {
>> +		struct strbuf obname = STRBUF_INIT;
>> +
>> +		if (filter->abbrev < 0)
>> +			strbuf_addf(&obname, "%%(objectname:short)");
>> +		else if (!filter->abbrev)
>> +			strbuf_addf(&obname, "%%(objectname)");
>> +		else
>> +			strbuf_addf(&obname, " %%(objectname:short=%d) ", filter->abbrev);
>                                               ^                       ^
> I wonder why the last one has leading space --/ and trailing one -----/
> The rest (for default abbrev and for no abbrev do not).

Thanks for spotting; that's just an editor cruft that shouldn't have
been there.






[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]