Re: [PATCH resend] builtin/clone: fix segfault when using --revision on some servers
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Junio C Hamano <[email protected]> writes: > I do not know offhand if that is the case, but if it is always wrong > for guess_remote_head() to return a guessed ref with NULL in its > '.peer_ref' member, perhaps that would be a better location to make > this fix. What do you think? Never mind, scratch that part. If we are fetching without storing the result in any remote-tracking ref, '.peer_ref' is legitimately NULL, and if we are storing, '.peer_ref' names the local ref where we store the result. This should not affect our guess as to which of their branches may be pointed to by their 'HEAD'. So this patch fixes the issue in the right place. It would still be nice to have a new test to prevent future regressions, though. Thanks.