Subject: Re: [PATCH v2] apply: normalize path in --directory argument

From: Junio C Hamano <[email-masked]>
Date: Fri, 20 Feb 2026 12:26:59 -0800

"Joaquim Rocha via GitGitGadget" <[email-masked]> writes:

> From: Joaquim Rocha <[email-masked]>
>
> 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 <[email-masked]>
> ---
>     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).