summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-25 22:54:23 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-28 16:22:00 -0700
commit05dd8e2ee2ecba1b4ef1dbbde5c81281152604b4 (patch)
treea47668b32b27c0244faa7a9c186fad14f83c6b07 /git-pull.sh
parent3e03aaf523331d4f3e92e680f75e6053d1813b64 (diff)
downloadgit-05dd8e2ee2ecba1b4ef1dbbde5c81281152604b4.tar.gz
Fix default pull not to do an unintended Octopus.
The refspecs specified in the .git/remotes/<remote> on the "Pull: " lines are for fetching multiple heads in one go, but most of the time making an Octopus out of them is not what is wanted. Make git-fetch leave the marker in .git/FETCH_HEAD file so that later stages can tell which heads are for merging and which are not. Tom Prince made me realize how stupid the original behaviour was. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index e3d11961b0..67c7f9562b 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -24,7 +24,9 @@ then
die "You need to first update your working tree."
fi
-merge_head=$(sed -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | tr '\012' ' ')
+merge_head=$(sed -e '/ not-for-merge /d' \
+ -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | \
+ tr '\012' ' ')
case "$merge_head" in
'')