Code

Fix 'git add' with .gitignore
[git.git] / 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