git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-checkout: do not allow -f and -m at the same time.

From
Junio C Hamano <junkio@cox.net>
Date
Nov 15, 2006, 19:06 UTC
Message-ID
<7vfyckmsw1.fsf@assigned-by-dhcp.cox.net>

Instead of silently ignoring one over the other, complain on this incompatible combination.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * Back to fixing usability issues one at a time instead of
   throwing everything away with bathwater.
 git-checkout.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-checkout.sh b/git-checkout.sh
index 119bca1..eb28b29 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.
 #
-- 
1.4.4
Message 1 of 1 in “git-checkout: do not allow -f and -m at the same time.”
  1. git-checkout: do not allow -f and -m at the same time.Junio C Hamano, Nov 15, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.