Re: [PATCH v2] log: add log.follow config option

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

 



David Turner <dturner@xxxxxxxxxxxxxxxx> writes:

>> IOW, I'd like to know why we need more than something like this
>> change to this file, instead of the above?  We didn't muck with
>> revs->diff in the original when FOLLOW_RENAMES was set, but now it
>> does, for example.
>
> We did, but we did it earlier.  But I can just rearrange the code.

Ah, I see.  You don't have to move the existing code for that then.
Just insert the "if prune has one element and DEFAULT_ is set" thing
before the first use of FOLLOW_RENAMES (i.e. "pick, filter and follow
needs diff" piece) and you are done, I think.

Thanks.

>
>> diff --git a/revision.c b/revision.c
>> index 3ff8723..f7bd229 100644
>> --- a/revision.c
>> +++ b/revision.c
>> @@ -2270,6 +2270,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
>>  			got_rev_arg = 1;
>>  	}
>>  
>> +	if (DIFF_OPT_TST(&revs->diffopt, DEFAULT_FOLLOW_RENAMES) &&
>> +	    revs->diffopt.pathspec.nr == 1)
>> +		DIFF_OPT_SET(&revs->diffopt, FOLLOW_RENAMES);
>> +
>>  	if (prune_data.nr) {
>>  		/*
>>  		 * If we need to introduce the magic "a lone ':' means no
>
> revs->diffopt.pathspec isn't set up yet then. But prune_data is, so I
> can use that. 
>
> Will send a v3.
--
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]