summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/path.c b/path.c
index a7ceea26fb..47753aaffc 100644
--- a/path.c
+++ b/path.c
@@ -70,19 +70,12 @@ static void vsnpath(struct strbuf *buf, const char *fmt, va_list args)
strbuf_cleanup_path(buf);
}
-char *git_snpath(char *buf, size_t n, const char *fmt, ...)
+void strbuf_git_path(struct strbuf *sb, const char *fmt, ...)
{
- struct strbuf sb = STRBUF_INIT;
va_list args;
va_start(args, fmt);
- vsnpath(&sb, fmt, args);
+ vsnpath(sb, fmt, args);
va_end(args);
- if (sb.len >= n)
- strlcpy(buf, bad_path, n);
- else
- memcpy(buf, sb.buf, sb.len + 1);
- strbuf_release(&sb);
- return buf;
}
char *git_pathdup(const char *fmt, ...)