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

[PATCH 1/2] git add: add long equivalents of '-u' and '-f' options

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Jun 14, 2008, 09:48 UTC
Message-ID
<1213436881-2360-1-git-send-email-szeder@ira.uka.de>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 Documentation/git-add.txt |    7 +++++--
 builtin-add.c             |    4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 9c6b081..b8e3fa6 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -8,8 +8,9 @@ git-add - Add file contents to the index
 SYNOPSIS
 --------
 [verse]
-'git-add' [-n] [-v] [-f] [--interactive | -i] [--patch | -p] [-u] [--refresh]
-	  [--ignore-errors] [--] <filepattern>...
+'git-add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
+	  [--update | -u] [--refresh] [--ignore-errors] [--]
+	  <filepattern>...
 
 DESCRIPTION
 -----------
@@ -59,6 +60,7 @@ OPTIONS
         Be verbose.
 
 -f::
+--force::
 	Allow adding otherwise ignored files.
 
 -i::
@@ -75,6 +77,7 @@ OPTIONS
 	the specified filepatterns before exiting.
 
 -u::
+--update::
 	Update only files that git already knows about, staging modified
 	content for commit and marking deleted files for removal. This
 	is similar
diff --git a/builtin-add.c b/builtin-add.c
index 1da22ee..9930cf5 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -200,8 +200,8 @@ static struct option builtin_add_options[] = {
 	OPT_GROUP(""),
 	OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"),
 	OPT_BOOLEAN('p', "patch", &patch_interactive, "interactive patching"),
-	OPT_BOOLEAN('f', NULL, &ignored_too, "allow adding otherwise ignored files"),
-	OPT_BOOLEAN('u', NULL, &take_worktree_changes, "update tracked files"),
+	OPT_BOOLEAN('f', "force", &ignored_too, "allow adding otherwise ignored files"),
+	OPT_BOOLEAN('u', "update", &take_worktree_changes, "update tracked files"),
 	OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"),
 	OPT_BOOLEAN( 0 , "ignore-errors", &ignore_add_errors, "just skip files which cannot be added because of errors"),
 	OPT_END(),
-- 
1.5.6.rc2.55.g9b8c
Next: SZEDER Gábor
Message 1 of 5 in “git add: add long equivalents of '-u' and '-f' options”
  1. 1/2 git add: add long equivalents of '-u' and '-f' optionsSZEDER Gábor, Jun 14, 2008
  2. 2/2 bash: add more 'git add' optionsSZEDER Gábor, Jun 14, 2008
  3. SZEDER GáborJun 15, 2008
  4. Junio C HamanoJun 15, 2008
  5. SZEDER GáborJun 15, 2008

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.