Skip to content

fix "foo**/bar" matching "foobar"

Jeff King git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2match_pathname(): reorder prefix-match checkdir.c+6 -50 replies
2/2match_pathname(): give fnmatch one char of prefix contextdir.c t/t0008-ignores.sh+17 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] fix "foo**/bar" matching "foobar"
Quoted 3 lines · Jeff King

Me too. I wrote it a few different ways before ending up with the "== 1", just because it made the diff smaller. But let me do it as two steps, which I think will make it all more clear.

Here it is. Maybe excessive to split it up, but each patch is quite nice to read now. :)

[1/2]: match_pathname(): reorder prefix-match check [2/2]: match_pathname(): give fnmatch one char of prefix context

 dir.c              | 18 ++++++++++++------
 t/t0008-ignores.sh | 11 +++++++++++
 2 files changed, 23 insertions(+), 6 deletions(-)

-Peff