summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-24 09:59:53 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-24 10:18:57 (GMT)
commit80c797764a6b6a373f0f1f47d7f56b0d950418a9 (patch)
treea9e9b864fb4bb051f87c6b0bb5985122b5dc1868
parente036c90a913889dfa8097ebe73b619370e0c6f32 (diff)
downloadgit-80c797764a6b6a373f0f1f47d7f56b0d950418a9.zip
git-80c797764a6b6a373f0f1f47d7f56b0d950418a9.tar.gz
git-80c797764a6b6a373f0f1f47d7f56b0d950418a9.tar.bz2
Allow branch.*.merge to talk about remote tracking branches.
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>
-rwxr-xr-xgit-parse-remote.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index aaef861..144f170 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -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