git/builtin
Jonathan Nieder 30d00c395e 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>
2010-06-13 09:15:09 -07:00
..
add.c
annotate.c
apply.c Merge branch 'bg/apply-blank-trailing-context' 2010-05-08 22:37:41 -07:00
archive.c
bisect--helper.c
blame.c
branch.c
bundle.c
cat-file.c
check-attr.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'em/checkout-orphan' 2010-05-21 04:02:14 -07:00
clean.c
clone.c Merge branch 'sr/remote-helper-export' 2010-05-21 04:02:15 -07:00
commit-tree.c
commit.c Merge branch 'jc/status-show-ignored' 2010-05-21 04:02:16 -07:00
config.c
count-objects.c
describe.c Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' 2010-05-21 04:02:17 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c
fetch-pack.c
fetch.c Merge branch 'maint' 2010-04-09 22:43:18 -07:00
fmt-merge-msg.c
for-each-ref.c for-each-ref: Field with abbreviated objectname 2010-05-18 21:49:04 -07:00
fsck.c
gc.c
grep.c grep: refactor grep_objects loop into its own function 2010-06-13 09:15:09 -07:00
hash-object.c
help.c
index-pack.c Merge branch 'np/index-pack-memsave' 2010-05-21 04:02:19 -07:00
init-db.c handle "git --bare init <dir>" properly 2010-05-10 11:25:37 -07:00
log.c Merge branch 'sd/log-decorate' 2010-05-08 22:36:14 -07:00
ls-files.c
ls-remote.c ls-remote: fall-back to default remotes when no remote specified 2010-04-08 23:10:43 -07:00
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'cc/revert-strategy' 2010-05-08 22:34:47 -07:00
mktag.c
mktree.c
mv.c
name-rev.c
notes.c
pack-objects.c Merge branch 'np/malloc-threading' 2010-05-21 04:02:16 -07:00
pack-redundant.c
pack-refs.c
patch-id.c patch-id: Add support for mbox format 2010-04-19 13:01:49 -07:00
prune-packed.c
prune.c
push.c Merge branch 'maint' 2010-04-09 22:43:18 -07:00
read-tree.c
receive-pack.c Merge branch 'js/maint-receive-pack-symref-alias' 2010-05-21 04:02:19 -07:00
reflog.c Merge branch 'jc/maint-no-reflog-expire-unreach-for-head' 2010-05-21 04:02:18 -07:00
remote.c remote add: add a --[no-]tags option 2010-04-19 16:39:24 -07:00
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c
revert.c Merge branch 'cc/revert-strategy' 2010-05-08 22:34:47 -07:00
rm.c
send-pack.c
shortlog.c Merge branch 'jn/shortlog' 2010-05-21 04:02:20 -07:00
show-branch.c show-branch: use DEFAULT_ABBREV instead of 7 2010-05-25 09:48:49 -07:00
show-ref.c
stripspace.c
symbolic-ref.c
tag.c tag -v: use RUN_GIT_CMD to run verify-tag 2010-04-17 12:40:19 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c