Code

Allow branch.*.merge to talk about remote tracking branches.
authorJunio C Hamano <junkio@cox.net>
Sun, 24 Dec 2006 09:59:53 +0000 (01:59 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 24 Dec 2006 10:18:57 +0000 (02:18 -0800)
People often get confused if the value of branch.*.merge should
be the remote branch name they are fetching from, or the
tracking branch they locally have.  So this allows either.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-parse-remote.sh

index aaef861ada3f6bac2a67a7eb0de20ab2ea95b6bf..144f1701553a1e2f4204a2df15e66437e0670123 100755 (executable)
@@ -146,8 +146,12 @@ canon_refs_list_for_fetch () {
                else
                        for merge_branch in $merge_branches
                        do
-                           [ "$remote" = "$merge_branch" ] &&
-                           dot_prefix= && break
+                           if  test "$remote" = "$merge_branch" ||
+                               test "$local" = "$merge_branch"
+                           then
+                                   dot_prefix=
+                                   break
+                           fi
                        done
                fi
                case "$remote" in