Re: git filter-branch not removing commits when it should in 2.7.0

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Tue, Jan 19, 2016 at 01:35:25PM -0800, Junio C Hamano wrote:
>
>> In other words, would the fix be a one-liner like this?
>> [...]
>> -		tree="$commit^{tree}"
>> +		tree=$(git rev-parse "$commit^{tree}")
>
> Yes, I was just writing up the commit message for it. :-/
>
> It _is_ slower, though, because it introduces an extra rev-parse. When
> we could in fact be getting rid of one. Give me a moment to complete a
> few timing tests and post the results.

Good point.

We should do that rev-parse in the helper function.  That rev-parse
is there only because the skip-empty code wants to know the exact
object name when comparing.  There is no reason for this code to do
it for the helper--the helper, if (and only if) it is called, can
do the rev-parse itself, and we can still omit the overhead when
we are not skipping empty ones.
--
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]