Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-07-01 02:33:45 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-29 23:22:30 +0400
commita0f4afbe87ddda7902e36350d163dea146166550 (patch)
tree9c90142f461b86ef045d672793b95f135be1970f /refs.c
parent0a53e9ddeaddad63ad106860237bbf53411d11a7 (diff)
clean: require double -f options to nuke nested git repository and work tree
When you have an embedded git work tree in your work tree (be it an orphaned submodule, or an independent checkout of an unrelated project), "git clean -d -f" blindly descended into it and removed everything. This is rarely what the user wants. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index e49eaa3089..dd9c9ba3f6 100644
--- a/refs.c
+++ b/refs.c
@@ -821,7 +821,7 @@ static int remove_empty_directories(const char *file)
strbuf_init(&path, 20);
strbuf_addstr(&path, file);
- result = remove_dir_recursively(&path, 1);
+ result = remove_dir_recursively(&path, REMOVE_DIR_EMPTY_ONLY);
strbuf_release(&path);