pathspec cleanup
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest16 patches 3 repliesIn review
- v416 patches 3 repliesSuperseded
- v316 patches 5 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 16 patches | 12 replies | Superseded | |
| v1 | 17 patches | 32 replies | Superseded |
Changes in v5 from the cover letter
* Move GUARD_PATHSPEC to prevent checking if pathspec is null twice.
* Mark a string containing 'mnemonic' for translation.
Patches in v5 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 00/16] pathspec cleanup
Changes in v5:
* Move GUARD_PATHSPEC to prevent checking if pathspec is null twice.
* Mark a string containing 'mnemonic' for translation.
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: remove struct path_simplify
dir: convert fill_directory to use the pathspec struct interface
ls-tree: convert show_recursive to use the pathspec struct interface
pathspec: remove the deprecated get_pathspec function
pathspec: copy and free owned memory
pathspec: remove unused variable from unsupported_magic
pathspec: always show mnemonic and name in unsupported_magic
pathspec: simpler logic to prefix original pathspec elements
pathspec: factor global magic into its own function
pathspec: create parse_short_magic function
pathspec: create parse_long_magic function
pathspec: create parse_element_magic helper
pathspec: create strip submodule slash helpers
pathspec: small readability changes
pathspec: rename prefix_pathspec to init_pathspec_item
Documentation/technical/api-setup.txt | 2 - builtin/ls-tree.c | 16 +- builtin/mv.c | 50 ++-- cache.h | 1 - dir.c | 191 ++++++-------- pathspec.c | 480 +++++++++++++++++++--------------- pathspec.h | 5 +- 7 files changed, 388 insertions(+), 357 deletions(-)
--- interdiff between v4 and v5
dir.c +16 -18
@@ -1353,18 +1353,17 @@ static int simplify_away(const char *path, int pathlen, {int i; -if (pathspec) -GUARD_PATHSPEC (pathspec, -PATHSPEC_FROMTOP | -PATHSPEC_MAXDEPTH | -PATHSPEC_LITERAL | -PATHSPEC_GLOB | -PATHSPEC_ICASE | -PATHSPEC_EXCLUDE ); -if (!pathspec || !pathspec->nr)return 0 ; +GUARD_PATHSPEC (pathspec, +PATHSPEC_FROMTOP | +PATHSPEC_MAXDEPTH | +PATHSPEC_LITERAL | +PATHSPEC_GLOB | +PATHSPEC_ICASE | +PATHSPEC_EXCLUDE ); +for (i =0 ; i < pathspec->nr; i++) {const struct pathspec_item *item = &pathspec->items[i];int len = item->nowildcard_len;
@@ -1394,18 +1393,17 @@ static int exclude_matches_pathspec(const char *path, int pathlen, {int i; -if (pathspec) -GUARD_PATHSPEC (pathspec, -PATHSPEC_FROMTOP | -PATHSPEC_MAXDEPTH | -PATHSPEC_LITERAL | -PATHSPEC_GLOB | -PATHSPEC_ICASE | -PATHSPEC_EXCLUDE ); -if (!pathspec || !pathspec->nr)return 0 ; +GUARD_PATHSPEC (pathspec, +PATHSPEC_FROMTOP | +PATHSPEC_MAXDEPTH | +PATHSPEC_LITERAL | +PATHSPEC_GLOB | +PATHSPEC_ICASE | +PATHSPEC_EXCLUDE ); +for (i =0 ; i < pathspec->nr; i++) {const struct pathspec_item *item = &pathspec->items[i];int len = item->nowildcard_len;
pathspec.c +1 -1
@@ -417,7 +417,7 @@ static void NORETURN unsupported_magic(const char *pattern,strbuf_addstr (&sb,", " );if (m->mnemonic) -strbuf_addf (&sb,"'%s' (mnemonic: '%c')" , +strbuf_addf (&sb,_ ("'%s' (mnemonic: '%c')" ), m->name, m->mnemonic);else strbuf_addf (&sb,"'%s'" , m->name);
Signature · 1 line
2.11.0.390.gc69c2f50cf-goog