From: Junio C Hamano Date: Wed, 15 Nov 2006 18:46:10 +0000 (-0800) Subject: git-checkout: do not allow -f and -m at the same time. X-Git-Tag: v1.4.4.1~22 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/897643cc79cb8c05694c98a4fb0560c78952db3e?hp=--cc git-checkout: do not allow -f and -m at the same time. Instead of silently ignoring one over the other, complain on this incompatible combination. Signed-off-by: Junio C Hamano --- 897643cc79cb8c05694c98a4fb0560c78952db3e diff --git a/git-checkout.sh b/git-checkout.sh index 119bca1ffb..eb28b291b6 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -77,6 +77,11 @@ while [ "$#" != "0" ]; do esac done +case "$force$merge" in +11) + die "git checkout: -f and -m are incompatible" +esac + # The behaviour of the command with and without explicit path # parameters is quite different. #