diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-11 05:24:45 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-11 05:24:46 (GMT) |
commit | aafb75452b2e9b3f17db3a07e9ed1cf77fdce693 (patch) | |
tree | 820b45d96c324cad16416e260eb3ea4626fe67a3 /Documentation | |
parent | 70bf0b755af4d1e66da25b7805cac0e481a082e4 (diff) | |
parent | 69f272b922df153c86db520bf9b6018a9808c2a6 (diff) | |
download | git-aafb75452b2e9b3f17db3a07e9ed1cf77fdce693.zip git-aafb75452b2e9b3f17db3a07e9ed1cf77fdce693.tar.gz git-aafb75452b2e9b3f17db3a07e9ed1cf77fdce693.tar.bz2 |
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 'Documentation')
-rw-r--r-- | Documentation/git-clean.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 0028ff1..a7f309d 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -26,18 +26,20 @@ are affected. OPTIONS ------- -d:: - Remove untracked directories in addition to untracked files. - If an untracked directory is managed by a different Git - repository, it is not removed by default. Use -f option twice - if you really want to remove such a directory. + Normally, when no <path> is specified, git clean will not + recurse into untracked directories to avoid removing too much. + Specify -d to have it recurse into such directories as well. + If any paths are specified, -d is irrelevant; all untracked + files matching the specified paths (with exceptions for nested + git directories mentioned under `--force`) will be removed. -f:: --force:: If the Git configuration variable clean.requireForce is not set to false, 'git clean' will refuse to delete files or directories - unless given -f, -n or -i. Git will refuse to delete directories - with .git sub directory or file unless a second -f - is given. + unless given -f or -i. Git will refuse to modify untracked + nested git repositories (directories with a .git subdirectory) + unless a second -f is given. -i:: --interactive:: |