aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/config
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2024-03-03 12:50:32 +0300
committerJunio C Hamano <gitster@pobox.com>2024-03-03 09:50:04 -0800
commit12a4883feb53d08a80b3c049415105b0543f27a5 (patch)
tree2f32aa5e65dc0356cbc570b1d91f384305432143 /Documentation/config
parentb387623c12f3f4a376e4d35a610fd3e55d7ea907 (diff)
downloadgit-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/config')
-rw-r--r--Documentation/config/clean.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/config/clean.txt b/Documentation/config/clean.txt
index f05b9403b5..b19ca210f3 100644
--- a/Documentation/config/clean.txt
+++ b/Documentation/config/clean.txt
@@ -1,3 +1,3 @@
clean.requireForce::
- A boolean to make git-clean do nothing unless given -f,
- -i, or -n. Defaults to true.
+ A boolean to make git-clean refuse to delete files unless -f
+ or -i is given. Defaults to true.