summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2010-03-26 15:25:33 +0000
committerJunio C Hamano <gitster@pobox.com>2010-03-28 09:53:01 -0700
commitd1723296af67e6bbadf6e73cd1e921aefafe491f (patch)
tree4a998c1b3da5b4848945eaede735518502c1c281 /git-compat-util.h
parent10e13ec8ed36019d131d27cd9fe2e8cc0f99b896 (diff)
downloadgit-d1723296af67e6bbadf6e73cd1e921aefafe491f.tar.gz
Implement the rmdir_or_warn function
This patch implements an rmdir_or_warn function (like unlink_or_warn but for directories) that uses the generalised warning code in warn_if_unremovable. Signed-off-by: Peter Collingbourne <peter@pcc.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index a3c4537366..67ea4c89f5 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -469,5 +469,9 @@ void git_qsort(void *base, size_t nmemb, size_t size,
* Always returns the return value of unlink(2).
*/
int unlink_or_warn(const char *path);
+/*
+ * Likewise for rmdir(2).
+ */
+int rmdir_or_warn(const char *path);
#endif