summaryrefslogtreecommitdiff
path: root/Documentation/git-grep.txt
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-06-12 11:31:18 -0500
committerJunio C Hamano <gitster@pobox.com>2010-06-13 09:15:09 -0700
commit30d00c395e3fb9f104a3f4a85f06a039c989cd8d (patch)
tree8c587e5e49d288a58f2b5fe95a93e1df3bcf9be0 /Documentation/git-grep.txt
parent7c42e390a37a11b1f7a77f5f07c261a8f930663a (diff)
downloadgit-30d00c395e3fb9f104a3f4a85f06a039c989cd8d.tar.gz
grep: refactor grep_objects loop into its own function
Simplify cmd_grep by splitting off the loop that finds matches in a list of trees. So now the main part of cmd_grep looks like: if (!use_index) { int hit = grep_directory(&opt, paths); if (use_threads) hit |= wait_all(); return !hit; } if (!list.nr) { if (!cached) setup_work_tree(); int hit = grep_cache(&opt, paths, cached); if (use_threads) hit |= wait_all; return !hit; } hit = grep_objects(&opt, path, &list); if (use_threads) hit |= wait_all(); return !hit; and is ripe for further refactoring. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-grep.txt')
0 files changed, 0 insertions, 0 deletions