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

Re: [PATCH] apply: strip ./ prefix from --directory argument

From
Joaquim Rocha <joaquim@amutable.com>
Date
Feb 18, 2026, 14:40 UTC
Message-ID
<CAFJE3DEro4B+UReO0+639hrdUvFUSB6-v7LOxPFU05q15zgakQ@mail.gmail.com>
In-Reply-To
<aZXJVtgRYQAnxNnE@pks.im>
On Wed, Feb 18, 2026 at 2:14 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 6 quoted lines
>
> I guess that's fair, but especially with command line completion it
> might be easy to arrive at such paths. That may or may not be a good
> argument, I'm not sure myself.
>
> Patrick

I understand that. TBH, while not at your (plural) level of expertise in git, I am certainly an experienced user and still the error from the ./ use got me confused. So my proposal goes towards developer experience, like the similar command suggestions it also has. If there's no down side to it, I think it makes sense to have it.

An alternative would be to have a better error message if we detect there are redundant path artifacts, but in that case why wouldn't we just normalize the path as it's the user's clear intention?

Cheers,
Joaquim Rocha
Previous: Patrick SteinhardtNext: Joaquim Rocha via GitGitGadget
Message 5 of 7 in “apply: strip ./ prefix from --directory argument”
  1. apply: strip ./ prefix from --directory argumentJoaquim Rocha via GitGitGadget, Feb 13, 2026
  2. Patrick SteinhardtFeb 17, 2026
  3. Junio C HamanoFeb 17, 2026
  4. Patrick SteinhardtFeb 18, 2026
  5. Joaquim RochaFeb 18, 2026
  6. apply: normalize path in --directory argumentJoaquim Rocha via GitGitGadget, Feb 18, 2026
  7. Junio C HamanoFeb 20, 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.