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

Re: [PATCH v3] builtin/add.c: replace run_command() with direct apply_all_patches() call

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 11, 2026, 04:51 UTC
Message-ID
<xmqqechab03t.fsf@gitster.g>
In-Reply-To
<20260710195949.54928-1-gatlavishweshwarreddy26@gmail.com>
Gatla Vishweshwar Reddy <gatlavishweshwarreddy26@gmail.com> writes:
Show 6 quoted lines
> In response to review:
> - repo_git_path() returns an absolute path built from gitdir.
>   prefix_filename() in apply_all_patches() explicitly skips absolute
>   paths (see abspath.c lines 271-272 where is_absolute_path(arg)
>   causes the prefix to be skipped). Running "git add -e" from a
>   subdirectory is therefore safe.

I agree that we are safe when it is absolute (no room for prefix to take part); my question was more about repo_git_path() that derives its value from repo->gitdir which may or may not be absolute.

Does it always give you absolute, or sometimes it is relative and sometimes it is absolute?

> - A dedicated test for "git add -e" from a subdirectory would be
>   valuable. I looked but found no existing "add -e" tests in the test
>   suite to use as a reference.
"git grep -e 'add -e' t/" finds t3702.
Previous: Gatla Vishweshwar ReddyNext: Gatla Vishweshwar Reddy
Message 6 of 9 in “builtin/add.c: replace run_command() with direct apply_all_patches() call”
  1. builtin/add.c: replace run_command() with direct apply_all_patches() callGatla Vishweshwar Reddy, Jul 9, 2026
  2. Junio C HamanoJul 10, 2026
  3. builtin/add.c: replace run_command() with direct apply_all_patches() callGatla Vishweshwar Reddy, Jul 10, 2026
  4. Junio C HamanoJul 10, 2026
  5. builtin/add.c: replace run_command() with direct apply_all_patches() callGatla Vishweshwar Reddy, Jul 10, 2026
  6. Junio C HamanoJul 11, 2026
  7. builtin/add.c: replace run_command() with direct apply_all_patches() callGatla Vishweshwar Reddy, Jul 11, 2026
  8. Junio C HamanoJul 29, 2026
  9. Junio C HamanoAug 26, 2026

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.