summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/path.c b/path.c
index 95acbafa68..46a4d2714b 100644
--- a/path.c
+++ b/path.c
@@ -175,6 +175,16 @@ static void do_git_path(struct strbuf *buf, const char *fmt, va_list args)
strbuf_cleanup_path(buf);
}
+char *git_path_buf(struct strbuf *buf, const char *fmt, ...)
+{
+ va_list args;
+ strbuf_reset(buf);
+ va_start(args, fmt);
+ do_git_path(buf, fmt, args);
+ va_end(args);
+ return buf->buf;
+}
+
void strbuf_git_path(struct strbuf *sb, const char *fmt, ...)
{
va_list args;