Re: [RFC] http clone does not checkout working tree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 4, 2008, 19:02 UTC
- Message-ID
- <7vwsl5vxa5.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080604183858.GA7095@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> The following patch fixes it for me, but I really have no idea if there > isn't something more subtle at work. Sending to Linus, since "git blame" > points the surrounding code to you, and to Daniel, since the new clone > and the commit walker are your areas. > > --- > diff --git a/walker.c b/walker.c > index 31de6c1..0e68ee6 100644 > --- a/walker.c > +++ b/walker.c > @@ -59,6 +59,7 @@ static int process_tree(struct walker *walker, struct tree *tree) > free(tree->buffer); > tree->buffer = NULL; > tree->size = 0; > + tree->object.parsed = 0; > return 0; > } >
The patch looks good to me.
And blaming Linus for this is slightly unfair, as the context the original "process_tree()" taken out of was that tree object was used once and then never used after this codepath is done with it, even though he _could_ have a perfect foresight to anticipate that someday somebody might want to call the routine from elsewhere without understanding the implications.