From 4363dfbe3d2f3fe3a4bd0fa7e9b22a14532c6cdb Mon Sep 17 00:00:00 2001 From: Josef Weidendorfer Date: Tue, 19 Dec 2006 01:39:07 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- git-pull.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git-pull.sh') diff --git a/git-pull.sh b/git-pull.sh index e23beb685d..1703091bbb 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 ;; -- cgit v1.2.3