diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:35 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:36 -0800 |
| commit | 5b84280c65bef19bc3a810e17474c9861ea7ce89 (patch) | |
| tree | c534ac39e58573c776dcd9702636496a5cd000ad /builtin/ls-tree.c | |
| parent | 2e65591ed61ab488395c454004106a5e9424648e (diff) | |
| parent | 04bf052eef53c6be04d313d8ce11690beaf890b6 (diff) | |
Merge branch 'ab/grep-patterntype'
Some code clean-up in the "git grep" machinery.
* ab/grep-patterntype:
grep: simplify config parsing and option parsing
grep.c: do "if (bool && memchr())" not "if (memchr() && bool)"
grep.h: make "grep_opt.pattern_type_option" use its enum
grep API: call grep_config() after grep_init()
grep.c: don't pass along NULL callback value
built-ins: trust the "prefix" from run_builtin()
grep tests: add missing "grep.patternType" config tests
grep tests: create a helper function for "BRE" or "ERE"
log tests: check if grep_config() is called by "log"-like cmds
grep.h: remove unused "regex_t regexp" from grep_opt
Diffstat (limited to 'builtin/ls-tree.c')
| -rw-r--r-- | builtin/ls-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c index 3a442631c7..6cb554cbb0 100644 --- a/builtin/ls-tree.c +++ b/builtin/ls-tree.c @@ -150,7 +150,7 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix) git_config(git_default_config, NULL); ls_tree_prefix = prefix; - if (prefix && *prefix) + if (prefix) chomp_prefix = strlen(prefix); argc = parse_options(argc, argv, prefix, ls_tree_options, |
