diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-09-28 17:28:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-30 09:04:39 +0200 |
commit | 7155b727c9baae9ef6d7829370aefc09c4ab64e2 (patch) | |
tree | bf3a04f7d1081f740b472b48654a3594c59d3bb5 /dir.h | |
parent | bundle transport: fix an alloc_ref() call (diff) | |
download | git-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |