summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2008-09-27 00:56:46 +0200
committerShawn O. Pearce <spearce@spearce.org>2008-09-29 08:37:07 -0700
commit4a92d1bfb784b09641180d164e7d719080165dc4 (patch)
treeacefaa70210fdc745519f64de33745d3d0c742cc /dir.h
parentb9b378a001d35a64a30a652a45f8084ee2be6cdf (diff)
downloadgit-4a92d1bfb784b09641180d164e7d719080165dc4.tar.gz
Add remove_path: a function to remove as much as possible of a path
The function has two potential users which both managed to get wrong their implementations (the one in builtin-rm.c one has a memleak, and builtin-merge-recursive.c scribles over its const argument). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 2df15defb6..278ee42295 100644
--- a/dir.h
+++ b/dir.h
@@ -81,4 +81,7 @@ extern int is_inside_dir(const char *dir);
extern void setup_standard_excludes(struct dir_struct *dir);
extern int remove_dir_recursively(struct strbuf *path, int only_empty);
+/* tries to remove the path with empty directories along it, ignores ENOENT */
+extern int remove_path(const char *path);
+
#endif