Skip to content

Commit

Permalink
Allow abbreviations in the first refspec to be merged
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Barkalow authored and Junio C Hamano committed Sep 30, 2007
1 parent 4491e62 commit cfb8f89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cfb8f89

Please sign in to comment.