diff options
author | Marius Storm-Olsen <marius@trolltech.com> | 2008-06-05 14:22:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-09 15:48:19 -0700 |
commit | 6c2ce048bbfc6fbc2bdd86a3e586cb8881eb2dc2 (patch) | |
tree | 8b83b37d8320cd893441b3aa7cd5e2faa3b0a575 /builtin-commit.c | |
parent | 4bfee30a98783f7987c395e6006a2a6717344c04 (diff) | |
download | git-6c2ce048bbfc6fbc2bdd86a3e586cb8881eb2dc2.tar.gz |
Add argument 'no' commit/status option -u|--untracked-files
This new argument teaches Git to not look for any untracked files,
saving cycles on slow file systems, or large repos.
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 446a1086fd..0a70808280 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -103,7 +103,7 @@ static struct option builtin_commit_options[] = { OPT_BOOLEAN('o', "only", &only, "commit only specified files"), OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"), OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"), - { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, + { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, OPT_BOOLEAN(0, "allow-empty", &allow_empty, "ok to record an empty change"), OPT_STRING(0, "cleanup", &cleanup_arg, "default", "how to strip spaces and #comments from message"), @@ -798,6 +798,8 @@ static int parse_and_validate_options(int argc, const char *argv[], if (!untracked_files_arg) ; /* default already initialized */ + else if (!strcmp(untracked_files_arg, "no")) + show_untracked_files = SHOW_NO_UNTRACKED_FILES; else if (!strcmp(untracked_files_arg, "normal")) show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES; else if (!strcmp(untracked_files_arg, "all")) |