summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e276f01)
raw | patch | inline | side by side (parent: e276f01)
author | Clemens Buchacher <drizzd@aon.at> | |
Mon, 7 Sep 2009 08:48:01 +0000 (10:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Sep 2009 22:02:31 +0000 (15:02 -0700) |
If external_grep() is called and punts, grep_cache() mistakenly reported a
hit, even if there were none. The bug can be triggered by calling "git
grep --no-color" from a subdirectory.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hit, even if there were none. The bug can be triggered by calling "git
grep --no-color" from a subdirectory.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index f88a912ace9195c387566770432a904e2d7adcb7..da2f4fe1b85099fdce09d74062d4c700b3403fa3 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
hit = external_grep(opt, paths, cached);
if (hit >= 0)
return hit;
+ hit = 0;
}
#endif