diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-23 09:58:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-23 09:58:35 -0700 |
commit | be5ab43566a7f9ea663349dbb9d7e83e270b3396 (patch) | |
tree | cc2d48f22dcfe9969c7ab2be2a6fbf596431347b /builtin/grep.c | |
parent | b7aba2ef3450832828148e1a71b6a7198614b43d (diff) | |
parent | 488201c87e284ae06323b534c31e354811fb0d51 (diff) | |
download | git-be5ab43566a7f9ea663349dbb9d7e83e270b3396.tar.gz |
Merge branch 'jc/magic-pathspec'
* jc/magic-pathspec:
setup.c: Fix some "symbol not declared" sparse warnings
t3703: Skip tests using directory name ":" on Windows
revision.c: leave a note for "a lone :" enhancement
t3703, t4208: add test cases for magic pathspec
rev/path disambiguation: further restrict "misspelled index entry" diag
fix overslow :/no-such-string-ever-existed diagnostics
fix overstrict :<path> diagnosis
grep: use get_pathspec() correctly
pathspec: drop "lone : means no pathspec" from get_pathspec()
Revert "magic pathspec: add ":(icase)path" to match case insensitively"
magic pathspec: add ":(icase)path" to match case insensitively
magic pathspec: futureproof shorthand form
magic pathspec: add tentative ":/path/from/top/level" pathspec support
Diffstat (limited to 'builtin/grep.c')
-rw-r--r-- | builtin/grep.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 3ee2ec51de..931eee0d75 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -969,13 +969,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) verify_filename(prefix, argv[j]); } - if (i < argc) - paths = get_pathspec(prefix, argv + i); - else if (prefix) { - paths = xcalloc(2, sizeof(const char *)); - paths[0] = prefix; - paths[1] = NULL; - } + paths = get_pathspec(prefix, argv + i); init_pathspec(&pathspec, paths); pathspec.max_depth = opt.max_depth; pathspec.recursive = 1; |