Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ta/config-set-2'
[gitweb.git]
/
wrapper.c
diff --git
a/wrapper.c
b/wrapper.c
index bc1bfb86003cb4133cc4ce3ce6423ce780ed7c84..bd24cdabfb818d4eddde4f08819f5a0166283a6a 100644
(file)
--- a/
wrapper.c
+++ b/
wrapper.c
@@
-493,3
+493,11
@@
struct passwd *xgetpwuid_self(void)
errno ? strerror(errno) : _("no such user"));
return pw;
}
+
+char *xgetcwd(void)
+{
+ struct strbuf sb = STRBUF_INIT;
+ if (strbuf_getcwd(&sb))
+ die_errno(_("unable to get current working directory"));
+ return strbuf_detach(&sb, NULL);
+}