Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-03-24 Thread Junio C Hamano
Carlos Martín Nieto c...@elego.de writes: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop at the first match but look at all of the matches in order to determine

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-28 Thread Carlos Martín Nieto
On Thu, 2014-02-27 at 12:19 -0800, Junio C Hamano wrote: Carlos Martín Nieto c...@elego.de writes: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. Hmph, do we *need* to, really? Do you mean

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-28 Thread Junio C Hamano
Carlos Martín Nieto c...@elego.de writes: ... 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

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-27 Thread Michael Haggerty
On 02/27/2014 10:00 AM, Carlos Martín Nieto wrote: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop at the first match but look at all of the matches in order to

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-27 Thread Carlos Martín Nieto
On Thu, 2014-02-27 at 11:21 +0100, Michael Haggerty wrote: On 02/27/2014 10:00 AM, Carlos Martín Nieto wrote: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-27 Thread Junio C Hamano
Carlos Martín Nieto c...@elego.de writes: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. Hmph, do we *need* to, really? Do you mean fetching one ref on the remote side and storing that in multiple

Re: [PATCH 2/2] fetch: handle overlaping refspecs on --prune

2014-02-27 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Carlos Martín Nieto c...@elego.de writes: From: Carlos Martín Nieto c...@dwim.me We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. Hmph, do we *need* to, really? Do you mean fetching one ref on the