diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-16 01:36:32 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-16 13:01:41 -0800 |
commit | a71fb0a1412c82405f078fb536797d3f5de68d53 (patch) | |
tree | 521075aa28c42faa477a8ae7e3dda61954b0e077 | |
parent | git-clone: use wildcard specification for tracking branches (diff) | |
download | tgif-a71fb0a1412c82405f078fb536797d3f5de68d53.tar.xz |
git-pull: refuse default merge without branch.*.merge
Everybody hated the pull behaviour of merging the first branch
listed on remotes/* file (or remote.*.fetch config) into the
current branch. This finally corrects that UI wart by
forbidding "git pull" without an explicit branch name on the
command line or branch.$current.merge for the current branch.
The matching change to git-clone was made to prepare the default
branch.*.merge entry for the primary branch some time ago.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-x | git-parse-remote.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 6ae534bf89..f27c3c231b 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -144,7 +144,8 @@ canon_refs_list_for_fetch () { curr_branch=$(git-symbolic-ref HEAD | \ sed -e 's|^refs/heads/||') merge_branches=$(git-repo-config \ - --get-all "branch.${curr_branch}.merge") + --get-all "branch.${curr_branch}.merge") || + merge_branches=.this.would.never.match.any.ref. fi set x $(expand_refs_wildcard "$@") shift |