diff options
author | Sergey Organov <sorganov@gmail.com> | 2024-03-03 12:50:32 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-03 09:50:04 -0800 |
commit | 12a4883feb53d08a80b3c049415105b0543f27a5 (patch) | |
tree | 2f32aa5e65dc0356cbc570b1d91f384305432143 /Documentation/git-clean.txt | |
parent | b387623c12f3f4a376e4d35a610fd3e55d7ea907 (diff) | |
download | git-12a4883feb53d08a80b3c049415105b0543f27a5.tar.gz |
clean: improve -n and -f implementation and documentation
What -n actually does in addition to its documented behavior is
ignoring of configuration variable clean.requireForce, that makes
sense provided -n prevents files removal anyway.
So, first, document this in the manual, and then modify implementation
to make this more explicit in the code.
Improved implementation also stops to share single internal variable
'force' between command-line -f option and configuration variable
clean.requireForce, resulting in more clear logic.
Two error messages with slightly different text depending on if
clean.requireForce was explicitly set or not, are merged into a single
one.
The resulting error message now does not mention -n as well, as it
neither matches intended clean.requireForce usage nor reflects
clarified implementation.
Documentation of clean.requireForce is changed accordingly.
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-clean.txt')
-rw-r--r-- | Documentation/git-clean.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index 69331e3f05..662eebb852 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -49,6 +49,8 @@ OPTIONS -n:: --dry-run:: Don't actually remove anything, just show what would be done. + Configuration variable clean.requireForce is ignored, as + nothing will be deleted anyway. -q:: --quiet:: |