summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-07-28 18:24:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-28 20:48:07 (GMT)
commitf22a76e9110e8e31efa3781b1a3cf2b4565d9e8a (patch)
treead22c9025beca75ad94f43bede840ca46a529ba6 /Documentation/technical
parentebc5da3208824e25a89672a3b91bd13629b215fe (diff)
downloadgit-f22a76e9110e8e31efa3781b1a3cf2b4565d9e8a.zip
git-f22a76e9110e8e31efa3781b1a3cf2b4565d9e8a.tar.gz
git-f22a76e9110e8e31efa3781b1a3cf2b4565d9e8a.tar.bz2
strbuf: add strbuf_getcwd()
Add strbuf_getcwd(), which puts the current working directory into a strbuf. Because it doesn't use a fixed-size buffer it supports arbitrarily long paths, provided the platform's getcwd() does as well. At least on Linux and FreeBSD it handles paths longer than PATH_MAX just fine. Suggested-by: Karsten Blees <karsten.blees@gmail.com> Helped-by: Duy Nguyen <pclouds@gmail.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-strbuf.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index 3350d97..834c406 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -289,6 +289,10 @@ same behaviour as well.
use it unless you need the correct position in the file
descriptor.
+`strbuf_getcwd`::
+
+ Set the buffer to the path of the current working directory.
+
`stripspace`::
Strip whitespace from a buffer. The second parameter controls if