summaryrefslogtreecommitdiffstats
path: root/dir.h
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-09-28 17:28:54 +0200
committerJunio C Hamano <gitster@pobox.com>2007-09-30 09:04:39 +0200
commit7155b727c9baae9ef6d7829370aefc09c4ab64e2 (patch)
treebf3a04f7d1081f740b472b48654a3594c59d3bb5 /dir.h
parentbundle transport: fix an alloc_ref() call (diff)
downloadgit-7155b727c9baae9ef6d7829370aefc09c4ab64e2.tar.xz
git-7155b727c9baae9ef6d7829370aefc09c4ab64e2.zip
Introduce remove_dir_recursively()
There was a function called remove_empty_dir_recursive() buried in refs.c. Expose a slightly enhanced version in dir.h: it can now optionally remove a non-empty directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index f55a87b2cd..a248a23ac4 100644
--- a/dir.h
+++ b/dir.h
@@ -64,4 +64,6 @@ extern struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathna
extern char *get_relative_cwd(char *buffer, int size, const char *dir);
extern int is_inside_dir(const char *dir);
+extern int remove_dir_recursively(struct strbuf *path, int only_empty);
+
#endif