public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Joaquim Rocha via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Joaquim Rocha <me@joaquimrocha.com>,
	 Joaquim Rocha <joaquim@amutable.com>
Subject: Re: [PATCH v2] apply: normalize path in --directory argument
Date: Fri, 20 Feb 2026 12:26:59 -0800	[thread overview]
Message-ID: <xmqqpl5zw48c.fsf@gitster.g> (raw)
In-Reply-To: <pull.2198.v2.git.git.1771373732749.gitgitgadget@gmail.com> (Joaquim Rocha via GitGitGadget's message of "Wed, 18 Feb 2026 00:15:32 +0000")

"Joaquim Rocha via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Joaquim Rocha <joaquim@amutable.com>
>
> When passing a relative path like --directory=./some/sub, the leading
> "./" caused apply to prepend it literally to patch filenames, resulting
> in an error (invalid path).
> There may be more cases like this where users pass some/./path to the
> directory which can easily be normalized to an acceptable path, so
> these changes try to normalize the path before using it.
>
> Signed-off-by: Joaquim Rocha <joaquim@amutable.com>
> ---
>     apply: strip ./ prefix from --directory argument
>     
>     Changes since v1:
>     
>      * Normalized the path as Patrick recommended

Sounds like a sensible direction to go.

Will queue.  Thanks.  (of course, further reviews welcome).


      reply	other threads:[~2026-02-20 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13 17:08 [PATCH] apply: strip ./ prefix from --directory argument Joaquim Rocha via GitGitGadget
2026-02-17  8:06 ` Patrick Steinhardt
2026-02-17 20:27   ` Junio C Hamano
2026-02-18 14:14     ` Patrick Steinhardt
2026-02-18 14:40       ` Joaquim Rocha
2026-02-18  0:15 ` [PATCH v2] apply: normalize path in " Joaquim Rocha via GitGitGadget
2026-02-20 20:26   ` Junio C Hamano [this message]

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=xmqqpl5zw48c.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=joaquim@amutable.com \
    --cc=me@joaquimrocha.com \
    --cc=ps@pks.im \
    /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