Skip to content

add: fix pathspec handling when literal filenames match wildcard

K Jayatheerth git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1add: fix handling literal filenames and wildcardsdir.c+2 -115 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by.

PatchJeff King
1/1Mentored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] add: fix pathspec handling when literal filenames match wildcard

This patch fixes a bug in git add where a wildcard pathspec (e.g., 'f*') fails to expand correctly if a file with the *exact* name ('f*') exists. Previously, Git would incorrectly add only the literal match on the first run and skip expanding the wildcard.

With this fix, wildcard expansion behaves consistently even in the presence of an exact filename match.

To explicitly add the literal file, users should quote the wildcard:

    git add 'f\*'

Thanks you

K Jayatheerth (1):
add: fix handling literal filenames and wildcards

 dir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.49.0