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>
This commit is contained in:
Josef Weidendorfer
2006-12-19 01:39:07 +01:00
committed by Junio C Hamano
parent d4ebc36c5e
commit 4363dfbe3d
2 changed files with 4 additions and 10 deletions

View File

@ -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
;;