Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 28, 2014, 18:04 UTC
- Message-ID
- <xmqqy50vun9r.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1393590104.5277.19.camel@centaur.cmartin.tk>
Carlos Martín Nieto <cmn@elego.de> writes:
Show 5 quoted lines
> ... However, we now > have 'origin/master' and 'origin/pr/5' both of which match the > 'refs/remotes/origin/*' pattern. The current behaviour is to stop at the > first match, which would mark it as stale as there is no > 'refs/heads/pr/5' branch in the remote.
OK, but with a later pattern, we can find out that it came from pull/5 that was advertised by the remote. If we had origin/pr/1 when the remote no longer has pull/1, then we can say that is stale.
Makes sense. Thanks for an explanation.
I wonder how well --prune would work on a repository in pre 1.5 layout, where all branches were copied to local refs/heads/ hierarchy except for 'master' (which is renamed to 'origin'). Does it have a similar issue? Do we end up pruning refs/heads/origin away because we do not see it on the remote end, or we somehow already deal with it and not have to worry about it?