@matheusbsbs / matheus-bagliano / commits / cfb8f898a8
Fork 0

Allow abbreviations in the first refspec to be merged

The config item for a refspec side and the ref name that it matches aren't necessarily character-for-character identical. We actually want to merge a ref by default if: there is no per-branch config, it is the found result of looking for the match for the first refspec, and the first refspec is not a pattern. Beyond that, anything that get_fetch_map() thinks matches is fine. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Daniel Barkalow committed Sep 28, 2007 at 19:34 UTC cfb8f898a883e2fb2fd5ecec0fe83662b64f1373
1 file changed +1 -1
builtin-fetch.c
+1 -1
@@ -102,7 +102,7 @@ static struct ref *get_ref_map(struct transport *transport,
102 remote->fetch[i].dst[0])
103 *autotags = 1;
104 if (!i && !has_merge && ref_map &&
105 - !strcmp(remote->fetch[0].src, ref_map->name))
105 + !remote->fetch[0].pattern)
106 ref_map->merge = 1;
107 }
108 if (has_merge)