From: Junio C Hamano <gitster@pobox.com>
To: Gatla Vishweshwar Reddy <gatlavishweshwarreddy26@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3] builtin/add.c: replace run_command() with direct apply_all_patches() call
Date: Fri, 10 Jul 2026 21:51:02 -0700 [thread overview]
Message-ID: <xmqqechab03t.fsf@gitster.g> (raw)
In-Reply-To: <20260710195949.54928-1-gatlavishweshwarreddy26@gmail.com> (Gatla Vishweshwar Reddy's message of "Sat, 11 Jul 2026 01:28:20 +0530")
Gatla Vishweshwar Reddy <gatlavishweshwarreddy26@gmail.com> writes:
> 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.
next prev parent reply other threads:[~2026-07-11 4:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 19:26 [PATCH] builtin/add.c: replace run_command() with direct apply_all_patches() call Gatla Vishweshwar Reddy
2026-07-10 6:41 ` Junio C Hamano
2026-07-10 7:32 ` [PATCH v2] " Gatla Vishweshwar Reddy
2026-07-10 18:51 ` Junio C Hamano
2026-07-10 19:58 ` [PATCH v3] " Gatla Vishweshwar Reddy
2026-07-11 4:51 ` Junio C Hamano [this message]
2026-07-11 6:06 ` [PATCH v4] " Gatla Vishweshwar Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqechab03t.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=gatlavishweshwarreddy26@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox