Code

git-checkout: do not allow -f and -m at the same time.
authorJunio C Hamano <junkio@cox.net>
Wed, 15 Nov 2006 18:46:10 +0000 (10:46 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 15 Nov 2006 20:01:30 +0000 (12:01 -0800)
Instead of silently ignoring one over the other, complain on
this incompatible combination.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh

index 119bca1ffbfb8fb0dae404a8e7389f577aebc42c..eb28b291b6d1b7d77306bb3437b9955671e45d3a 100755 (executable)
@@ -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.
 #