Honor core.ignorecase for attribute patterns
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | attr.c: avoid inappropriate access to strbuf "buf" memberattr.c | +12 | 0 replies | |
| 2/4 | cleanup: use internal memory allocation wrapper functions everywhereattr.c builtin/ compat/ +5 more | +9 | 9 replies | |
| 3/4 | builtin/mv.c: plug miniscule memory leakbuiltin/ | +5 | 0 replies | |
| 4/4 | attr.c: respect core.ignorecase when matching attribute patternsattr.c t/ | +63 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Honor core.ignorecase for attribute patterns
Quoted 10 lines · Brandon Casey
Quoted 9 lines · Jeff King
Quoted 6 lines · Brandon Casey
...and I see there is already an
fnmatch_icase()indir.cwhich addsFNM_CASEFOLDwhen the global varignore_caseis set. So, maybe it's as easy as:
[...](quoted diff) +1
-1- return (fnmatch(pattern, basename, 0) == 0); + return (fnmatch_icase(pattern, basename, 0) == 0);
Quoted 6 lines
Quoted 2 lines
OK, wow. That's exactly the level of easy I was hoping for. Do you want to roll that up into a patch with some tests?
I haven't even tested that it runs. :) No, I was hoping someone who was more interested would finish it, and maybe even test on an affected system.
Ok, I lied. Here's a series that needs testing by people on a case-insensitive filesystem and some comments.
The first three patches are just housekeeping and can be accepted independently of the fourth patch which is marked WIP.
The last patch implements the case-insensitive matching of attribute patterns, but I discovered that bad things can happen if git_config() is called more than once. Details are in the patch email.
-Brandon
[PATCH 1/4] attr.c: avoid inappropriate access to strbuf "buf" [PATCH 2/4] cleanup: use internal memory allocation wrapper [PATCH 3/4] builtin/mv.c: plug miniscule memory leak [PATCH 4/4] attr.c: respect core.ignorecase when matching attribute