diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-06-12 11:31:18 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-13 09:15:09 -0700 |
commit | 30d00c395e3fb9f104a3f4a85f06a039c989cd8d (patch) | |
tree | 8c587e5e49d288a58f2b5fe95a93e1df3bcf9be0 /Documentation/git-merge-one-file.txt | |
parent | git svn: fix empty directory creation (diff) | |
download | tgif-30d00c395e3fb9f104a3f4a85f06a039c989cd8d.tar.xz |
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-merge-one-file.txt')
0 files changed, 0 insertions, 0 deletions