]> git.ipfire.org Git - thirdparty/git.git/blobdiff - path.h
path: move related function to path
[thirdparty/git.git] / path.h
diff --git a/path.h b/path.h
index 60e83a49a98507a276efccf6e355a2e375ac64ea..639372edd9ee36127e3b89084f89ee59d12ff60f 100644 (file)
--- a/path.h
+++ b/path.h
@@ -191,6 +191,11 @@ const char *remove_leading_path(const char *in, const char *prefix);
 const char *relative_path(const char *in, const char *prefix, struct strbuf *sb);
 int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);
 int normalize_path_copy(char *dst, const char *src);
+/**
+ * Normalize in-place the path contained in the strbuf. If an error occurs,
+ * the contents of "sb" are left untouched, and -1 is returned.
+ */
+int strbuf_normalize_path(struct strbuf *src);
 int longest_ancestor_length(const char *path, struct string_list *prefixes);
 char *strip_path_suffix(const char *path, const char *suffix);
 int daemon_avoid_alias(const char *path);