git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] getcwd without PATH_MAX

From
René Scharfe <l.s.r@web.de>
Date
Jul 20, 2014, 11:18 UTC
Message-ID
<53CBA59C.8050901@web.de>

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(-)
-- 
2.0.2
Next: René Scharfe
Message 1 of 10 in “getcwd without PATH_MAX”
  1. 0/3 getcwd without PATH_MAXRené Scharfe, Jul 20, 2014
  2. 1/3 strbuf: add strbuf_add_cwd()René Scharfe, Jul 20, 2014
  3. Duy NguyenJul 20, 2014
  4. René ScharfeJul 20, 2014
  5. 2/3 wrapper: add xgetcwd()René Scharfe, Jul 20, 2014
  6. Duy NguyenJul 20, 2014
  7. René ScharfeJul 20, 2014
  8. 3/3 use xgetcwd() get the current directory or dieRené Scharfe, Jul 20, 2014
  9. Duy NguyenJul 20, 2014
  10. René ScharfeJul 20, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.