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

[PATCH 0/4] Fix bugs related to real_path()

From
AGAlexandr Miloslavskiy via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 6, 2020, 19:03 UTC
Message-ID
<pull.575.git.1583521396.gitgitgadget@gmail.com>

The issue with `real_path()` seems to be long-standing, where multiple people solved parts of it over time. I'm adding another part here after I have discovered a crash related to it.

Even with this step, there are still problems remaining:
* `read_gitfile_gently()` still uses shared buffer.
* `absolute_path()` was not removed.

These issues remain because there're too many code references and I'd like to avoid submitting a single topic of a scary size.

Alexandr Miloslavskiy (4):
  set_git_dir: fix crash when used with real_path()
  real_path: remove unsafe API
  real_path_if_valid(): remove unsafe API
  get_superproject_working_tree(): return strbuf
 abspath.c                  | 18 +-----------------
 builtin/clone.c            |  7 ++++++-
 builtin/commit-graph.c     |  6 +++++-
 builtin/init-db.c          |  4 ++--
 builtin/rev-parse.c        | 12 ++++++++----
 builtin/worktree.c         | 10 +++++++---
 cache.h                    |  4 +---
 editor.c                   | 11 +++++++++--
 environment.c              | 18 ++++++++++++++++--
 path.c                     |  4 ++--
 setup.c                    | 37 ++++++++++++++++++++++++-------------
 sha1-file.c                | 13 ++++---------
 submodule.c                | 22 ++++++++++++----------
 submodule.h                |  4 ++--
 t/helper/test-path-utils.c |  6 +++++-
 worktree.c                 | 13 ++++++++++---
 16 files changed, 114 insertions(+), 75 deletions(-)
base-commit: 076cbdcd739aeb33c1be87b73aebae5e43d7bcc5
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-575%2FSyntevoAlex%2F%230205(git)_crash_real_path-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-575/SyntevoAlex/#0205(git)_crash_real_path-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/575
-- 
gitgitgadget
Next: Alexandr Miloslavskiy via GitGitGadget
Message 1 of 17 in “Fix bugs related to real_path()”
  1. 0/4 Fix bugs related to real_path()Alexandr Miloslavskiy via GitGitGadget, Mar 6, 2020
  2. 1/4 set_git_dir: fix crash when used with real_path()Alexandr Miloslavskiy via GitGitGadget, Mar 6, 2020
  3. Junio C HamanoMar 6, 2020
  4. Alexandr MiloslavskiyMar 6, 2020
  5. 4/4 get_superproject_working_tree(): return strbufAlexandr Miloslavskiy via GitGitGadget, Mar 6, 2020
  6. Junio C HamanoMar 6, 2020
  7. Alexandr MiloslavskiyMar 6, 2020
  8. 2/4 real_path: remove unsafe APIAlexandr Miloslavskiy via GitGitGadget, Mar 6, 2020
  9. Junio C HamanoMar 6, 2020
  10. Alexandr MiloslavskiyMar 6, 2020
  11. 3/4 real_path_if_valid(): remove unsafe APIAlexandr Miloslavskiy via GitGitGadget, Mar 6, 2020
  12. Junio C HamanoMar 6, 2020
  13. 0/4 Fix bugs related to real_path()Alexandr Miloslavskiy via GitGitGadget, Mar 10, 2020
  14. 4/4 get_superproject_working_tree(): return strbufAlexandr Miloslavskiy via GitGitGadget, Mar 10, 2020
  15. 3/4 real_path_if_valid(): remove unsafe APIAlexandr Miloslavskiy via GitGitGadget, Mar 10, 2020
  16. 2/4 real_path: remove unsafe APIAlexandr Miloslavskiy via GitGitGadget, Mar 10, 2020
  17. 1/4 set_git_dir: fix crash when used with real_path()Alexandr Miloslavskiy via GitGitGadget, Mar 10, 2020

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.