git add: add long equivalents of '-u' and '-f' options
The option -u stands for --update and it is a good idea to make it clear especially because this is the only mode of operation of "git add" that does something different from "adding". Give longer --force synonym to -f while we are at it as well. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Jun 14, 2008 at 11:48 UTC
69c61c4fa9a4b38eeb611a86102493394cdeb9cf
2 files changed
+7
-4
Documentation/git-add.txt
+5
-2
@@ -8,8 +8,9 @@ git-add - Add file contents to the index
8
SYNOPSIS
9
--------
10
[verse]
11
-'git-add' [-n] [-v] [-f] [--interactive | -i] [--patch | -p] [-u] [--refresh]
12
- [--ignore-errors] [--] <filepattern>...
11
+'git-add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
12
+ [--update | -u] [--refresh] [--ignore-errors] [--]
13
+ <filepattern>...
14
15
DESCRIPTION
16
-----------
@@ -59,6 +60,7 @@ OPTIONS
60
Be verbose.
61
62
-f::
63
+--force::
64
Allow adding otherwise ignored files.
65
66
-i::
@@ -75,6 +77,7 @@ OPTIONS
77
the specified filepatterns before exiting.
78
79
-u::
80
+--update::
81
Update only files that git already knows about, staging modified
82
content for commit and marking deleted files for removal. This
83
is similar
builtin-add.c
+2
-2
@@ -200,8 +200,8 @@ static struct option builtin_add_options[] = {
200
OPT_GROUP(""),
201
OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"),
202
OPT_BOOLEAN('p', "patch", &patch_interactive, "interactive patching"),
203
- OPT_BOOLEAN('f', NULL, &ignored_too, "allow adding otherwise ignored files"),
204
- OPT_BOOLEAN('u', NULL, &take_worktree_changes, "update tracked files"),
203
+ OPT_BOOLEAN('f', "force", &ignored_too, "allow adding otherwise ignored files"),
204
+ OPT_BOOLEAN('u', "update", &take_worktree_changes, "update tracked files"),
205
OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"),
206
OPT_BOOLEAN( 0 , "ignore-errors", &ignore_add_errors, "just skip files which cannot be added because of errors"),
207
OPT_END(),