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

[PATCH] Add to usage and docs for git-add.sh

From
CSChris Shoemaker <c.shoemaker@cox.net>
Date
Oct 29, 2005, 21:46 UTC
Message-ID
<11306224011312-git-send-email-c.shoemaker@cox.net>
In-Reply-To
<11306224012707-git-send-email-c.shoemaker@cox.net>
Signed-off-by: Chris Shoemaker <c.shoemaker@cox.net>
---
 Documentation/git-add.txt |    9 ++++++++-
 git-add.sh                |    7 +++++++
 2 files changed, 15 insertions(+), 1 deletions(-)
2bc166e3e8241432b88ff793ec69a979a7056b3e
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -7,7 +7,7 @@ git-add - Add files to the cache.
 
 SYNOPSIS
 --------
-'git-add' <file>...
+'git-add' [-n] [-v] <file>...
 
 DESCRIPTION
 -----------
@@ -19,6 +19,13 @@ OPTIONS
 <file>...::
 	Files to add to the cache.
 
+-n::
+        Don't actually add the file(s), just show if they exist.
+
+-v::
+        Be verbose.
+
+
 Author
 ------
 Written by Linus Torvalds <torvalds@osdl.org>
diff --git a/git-add.sh b/git-add.sh
--- a/git-add.sh
+++ b/git-add.sh
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+usage() {
+    die "usage: git add [-n] [-v] <file>..."
+}
+
 show_only=
 verbose=
 while : ; do
@@ -10,6 +14,9 @@ while : ; do
     -v)
 	verbose=--verbose
 	;;
+    -*)
+	usage
+	;;
     *)
 	break
 	;;
Previous: Chris Shoemaker
Message 2 of 2 in “Add to documentation of git-update-index arguments and usage.”
  1. Add to documentation of git-update-index arguments and usage.Chris Shoemaker, Oct 29, 2005
  2. Add to usage and docs for git-add.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.