Commit e6f6371
fetch: handle overlaping refspecs on --prune
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
whether a head is stale.
To this goal, introduce a variant of query_refspecs which returns all of
the matching refspecs and loop over those answers to check for
staleness.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent f377e7a commit e6f6371
2 files changed
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
824 | 850 | | |
825 | 851 | | |
826 | 852 | | |
| |||
1954 | 1980 | | |
1955 | 1981 | | |
1956 | 1982 | | |
| 1983 | + | |
1957 | 1984 | | |
| 1985 | + | |
1958 | 1986 | | |
1959 | 1987 | | |
1960 | 1988 | | |
1961 | | - | |
1962 | | - | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1963 | 1992 | | |
1964 | 1993 | | |
1965 | 1994 | | |
1966 | 1995 | | |
1967 | | - | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1968 | 1999 | | |
1969 | | - | |
1970 | | - | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
1971 | 2008 | | |
1972 | 2009 | | |
1973 | 2010 | | |
1974 | 2011 | | |
1975 | | - | |
| 2012 | + | |
| 2013 | + | |
1976 | 2014 | | |
1977 | 2015 | | |
1978 | 2016 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments