diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-11 07:24:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-11 07:24:46 +0200 |
commit | aafb75452b2e9b3f17db3a07e9ed1cf77fdce693 (patch) | |
tree | 820b45d96c324cad16416e260eb3ea4626fe67a3 /dir.h | |
parent | Seventh batch (diff) | |
parent | dir: special case check for the possibility that pathspec is NULL (diff) | |
download | git-aafb75452b2e9b3f17db3a07e9ed1cf77fdce693.tar.xz git-aafb75452b2e9b3f17db3a07e9ed1cf77fdce693.zip |
Merge branch 'en/clean-nested-with-ignored'
"git clean" fixes.
* en/clean-nested-with-ignored:
dir: special case check for the possibility that pathspec is NULL
clean: fix theoretical path corruption
clean: rewrap overly long line
clean: avoid removing untracked files in a nested git repository
clean: disambiguate the definition of -d
git-clean.txt: do not claim we will delete files with -n/--dry-run
dir: add commentary explaining match_pathspec_item's return value
dir: if our pathspec might match files under a dir, recurse into it
dir: make the DO_MATCH_SUBMODULE code reusable for a non-submodule case
dir: also check directories for matching pathspecs
dir: fix off-by-one error in match_pathspec_item
dir: fix typo in comment
t7300: add testcases showing failure to clean specified pathspecs
Diffstat (limited to 'dir.h')
-rw-r--r-- | dir.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -156,7 +156,8 @@ struct dir_struct { DIR_SHOW_IGNORED_TOO = 1<<5, DIR_COLLECT_KILLED_ONLY = 1<<6, DIR_KEEP_UNTRACKED_CONTENTS = 1<<7, - DIR_SHOW_IGNORED_TOO_MODE_MATCHING = 1<<8 + DIR_SHOW_IGNORED_TOO_MODE_MATCHING = 1<<8, + DIR_SKIP_NESTED_GIT = 1<<9 } flags; struct dir_entry **entries; struct dir_entry **ignored; @@ -211,8 +212,9 @@ int count_slashes(const char *s); * when populating the seen[] array. */ #define MATCHED_RECURSIVELY 1 -#define MATCHED_FNMATCH 2 -#define MATCHED_EXACTLY 3 +#define MATCHED_RECURSIVELY_LEADING_PATHSPEC 2 +#define MATCHED_FNMATCH 3 +#define MATCHED_EXACTLY 4 int simple_length(const char *match); int no_wildcard(const char *string); char *common_prefix(const struct pathspec *pathspec); |