summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>2006-12-19 00:39:07 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-19 09:53:02 (GMT)
commit4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb (patch)
tree9828125cc72c6fe06210c519bb2449c60d1d40f6 /git-pull.sh
parentd4ebc36c5ee964592303c59260417b758d024c31 (diff)
downloadgit-4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb.zip
git-4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb.tar.gz
git-4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb.tar.bz2
Move "no merge candidate" warning into git-pull
The warning triggered even when running "git fetch" only when resulting .git/FETCH_HEAD only contained branches marked as 'not-for-merge'. Signed-off-by: Josef Weidendorfer <weidendo@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-pull.sh b/git-pull.sh
index e23beb6..1703091 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -76,6 +76,10 @@ merge_head=$(sed -e '/ not-for-merge /d' \
case "$merge_head" in
'')
+ curr_branch=$(git-symbolic-ref HEAD | \
+ sed -e 's|^refs/heads/||')
+ echo >&2 "Warning: No merge candidate found because value of config option
+ \"branch.${curr_branch}.merge\" does not match any remote branch fetched."
echo >&2 "No changes."
exit 0
;;