Skip to content

getcwd without PATH_MAX

René Scharfe git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3strbuf: add strbuf_add_cwd()Documentation/technical/api-strbuf.txt strbuf.c strbuf.h+27 -02 replies
2/3wrapper: add xgetcwd()git-compat-util.h wrapper.c+9 -02 replies
3/3use xgetcwd() get the current directory or diebuiltin/init-db.c builtin/rev-parse.c dir.c +1 more+23 -192 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] getcwd without PATH_MAX

Paths longer than PATH_MAX can be created and used on at least on some file systems. Currently we use getcwd() generally with a PATH_MAX- sized buffer. This short series adds two functions, strbuf_add_cwd() and xgetcwd(), then uses them to reduce the number of fixed-sized buffers and to allow us to handle longer working directory paths.

René Scharfe (3):
strbuf: add strbuf_add_cwd()
wrapper: add xgetcwd()
use xgetcwd() get the current directory or die

 Documentation/technical/api-strbuf.txt |  4 ++++
 builtin/init-db.c                      | 17 ++++++++---------
 builtin/rev-parse.c                    |  6 +++---
 dir.c                                  | 12 ++++++++----
 git-compat-util.h                      |  1 +
 strbuf.c                               | 22 ++++++++++++++++++++++
 strbuf.h                               |  1 +
 trace.c                                |  7 ++++---
 wrapper.c                              |  8 ++++++++
 9 files changed, 59 insertions(+), 19 deletions(-)
Signature · 1 line
2.0.2