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

[PATCH] Add usage statement to git-checkout.sh

From
CSChris Shoemaker <c.shoemaker@cox.net>
Date
Oct 29, 2005, 21:46 UTC
Message-ID
<11306224011899-git-send-email-c.shoemaker@cox.net>
Signed-off-by: Chris Shoemaker <c.shoemaker@cox.net>
---
 git-checkout.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
2fcbb6e58c0902e19373305b7ea77234f5d3ffba
diff --git a/git-checkout.sh b/git-checkout.sh
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -1,6 +1,10 @@
 #!/bin/sh
 . git-sh-setup || die "Not a git archive"
 
+usage () {
+    die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]"
+}
+
 old=$(git-rev-parse HEAD)
 new=
 force=
@@ -26,6 +30,9 @@ while [ "$#" != "0" ]; do
 	--)
 		break
 		;;
+	-*)
+		usage
+		;;
 	*)
 		if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
 		then
Message 1 of 1 in “Add usage statement to git-checkout.sh”
  1. Add usage statement to git-checkout.shChris Shoemaker, Oct 29, 2005

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.