Re: [PATCH 2/3] wrapper: add xgetcwd()

2014-07-20 Thread René Scharfe
Am 20.07.2014 14:35, schrieb Duy Nguyen: On Sun, Jul 20, 2014 at 6:21 PM, René Scharfe wrote: +char *xgetcwd(void) +{ + struct strbuf sb = STRBUF_INIT; + if (strbuf_add_cwd(&sb)) + die_errno("unable to get current working directory"); Wrap the string with _() to make

Re: [PATCH 2/3] wrapper: add xgetcwd()

2014-07-20 Thread Duy Nguyen
On Sun, Jul 20, 2014 at 6:21 PM, René Scharfe wrote: > +char *xgetcwd(void) > +{ > + struct strbuf sb = STRBUF_INIT; > + if (strbuf_add_cwd(&sb)) > + die_errno("unable to get current working directory"); Wrap the string with _() to make it translatable? I can't see why a

[PATCH 2/3] wrapper: add xgetcwd()

2014-07-20 Thread René Scharfe
Add the helper function xgetcwd(), which returns the current directory or dies. The returned string has to be free()d after use. Signed-off-by: Rene Scharfe --- git-compat-util.h | 1 + wrapper.c | 8 2 files changed, 9 insertions(+) diff --git a/git-compat-util.h b/git-compat