Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-07-28 22:33:55 +0400
committerJunio C Hamano <gitster@pobox.com>2014-08-26 22:06:06 +0400
commit679eebe24d4c2120f8c01fb4524fcc489718fc9c (patch)
tree0dffe663fbce093ec9c07ab1c621b3d143995db3 /strbuf.h
parent4d3ab44d26c47d100cec39d0ef9ed9746eb7e454 (diff)
abspath: convert absolute_path() to strbuf
Move most of the code of absolute_path() into the new function strbuf_add_absolute_path() and in the process transform it to use struct strbuf and xgetcwd() instead of a PATH_MAX-sized buffer, which can be too small on some file systems. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index 23b16c6cdf..455826ceb0 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -179,6 +179,8 @@ extern void strbuf_addstr_urlencode(struct strbuf *, const char *,
int reserved);
extern void strbuf_humanise_bytes(struct strbuf *buf, off_t bytes);
+extern void strbuf_add_absolute_path(struct strbuf *sb, const char *path);
+
__attribute__((format (printf,1,2)))
extern int printf_ln(const char *fmt, ...);
__attribute__((format (printf,2,3)))