summaryrefslogtreecommitdiff
path: root/builtin-ls-files.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-11-15 02:04:30 -0500
committerJunio C Hamano <gitster@pobox.com>2007-11-15 22:24:10 -0800
commit8e7b07c8a776c401ff5c4adb593f423a754d198c (patch)
tree8fd450fff043c5c7521bd2b547d2cb6efb6f31c8 /builtin-ls-files.c
parenta777e9ca54b5801266486a16dc0d25c82b38014d (diff)
downloadgit-8e7b07c8a776c401ff5c4adb593f423a754d198c.tar.gz
git-ls-files: add --exclude-standard
This provides a way for scripts to get at the new standard exclude function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r--builtin-ls-files.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index e0b856f432..7f60709830 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -387,8 +387,8 @@ static void overlay_tree(const char *tree_name, const char *prefix)
static const char ls_files_usage[] =
"git-ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
- "[ --exclude-per-directory=<filename> ] [--full-name] [--abbrev] "
- "[--] [<file>]*";
+ "[ --exclude-per-directory=<filename> ] [--exclude-standard] "
+ "[--full-name] [--abbrev] [--] [<file>]*";
int cmd_ls_files(int argc, const char **argv, const char *prefix)
{
@@ -496,6 +496,11 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
dir.exclude_per_dir = arg + 24;
continue;
}
+ if (!strcmp(arg, "--exclude-standard")) {
+ exc_given = 1;
+ setup_standard_excludes(&dir);
+ continue;
+ }
if (!strcmp(arg, "--full-name")) {
prefix_offset = 0;
continue;