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.