diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-09-28 16:28:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-30 00:04:39 -0700 |
commit | 7155b727c9baae9ef6d7829370aefc09c4ab64e2 (patch) | |
tree | bf3a04f7d1081f740b472b48654a3594c59d3bb5 /dir.h | |
parent | 90446a0009d9c9c0a06c512f0836e0d30f78d2d0 (diff) | |
download | git-7155b727c9baae9ef6d7829370aefc09c4ab64e2.tar.gz git-7155b727c9baae9ef6d7829370aefc09c4ab64e2.tar.xz |
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 |