Re: Bug in fetch-pack.c, please confirm
- From
Jeff King <peff@peff.net>
- Date
- Mar 19, 2015, 20:31 UTC
- Message-ID
- <20150319203126.GA31663@peff.net>
- In-Reply-To
- <xmqqtwxgizg9.fsf@gitster.dls.corp.google.com>
On Thu, Mar 19, 2015 at 12:01:26PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> > I'm working up a few patches in that area, which I'll send out in a few > > minutes. Once that is done, then I think the explanation you give above > > would be correct. > > If a follow-up is coming then I'd just drop this one. Thanks.
OK, here it is. Took me a bit longer than I expected, as I wanted to figure out whether the second patch was actually fixing a bug (and if so, to add test coverage). Turns out that it is a real bug.
The final patch is what you sent, rebased on top (though there are not any code changes; the underlying commits make the _explanation_ true, but no code change was required). I fixed up the nits I mentioned in my earlier email.
[1/4]: filter_ref: avoid overwriting ref->old_sha1 with garbage [2/4]: filter_ref: make a copy of extra "sought" entries [3/4]: fetch_refs_via_pack: free extra copy of refs [4/4]: fetch-pack: remove dead assignment to ref->new_sha1
-Peff