From cfb8f898a883e2fb2fd5ecec0fe83662b64f1373 Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Fri, 28 Sep 2007 19:34:17 -0400 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- builtin-fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-fetch.c b/builtin-fetch.c index 2f639ccef2..ac68ff592e 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -102,7 +102,7 @@ static struct ref *get_ref_map(struct transport *transport, remote->fetch[i].dst[0]) *autotags = 1; if (!i && !has_merge && ref_map && - !strcmp(remote->fetch[0].src, ref_map->name)) + !remote->fetch[0].pattern) ref_map->merge = 1; } if (has_merge) -- 2.11.4.GIT