summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-10 21:59:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-10 21:59:02 (GMT)
commit184a7aa7bf8e42ce9aba12b92d9cf8014d04a947 (patch)
tree625805572842c984cc7600e4880fdff4549e6558 /builtin
parent5febbda4e7afb4f26bed9d2dc5f9c4ceca86d2b8 (diff)
parent50dd0f2fd910d9973760db052897ee8e73ed2f1f (diff)
downloadgit-184a7aa7bf8e42ce9aba12b92d9cf8014d04a947.zip
git-184a7aa7bf8e42ce9aba12b92d9cf8014d04a947.tar.gz
git-184a7aa7bf8e42ce9aba12b92d9cf8014d04a947.tar.bz2
Merge branch 'tr/grep-l-with-decoration' into maint
* tr/grep-l-with-decoration: grep: fix -l/-L interaction with decoration lines
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 9ce064a..5c2ae94 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -1034,8 +1034,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
#ifndef NO_PTHREADS
if (use_threads) {
- if (opt.pre_context || opt.post_context || opt.file_break ||
- opt.funcbody)
+ if (!(opt.name_only || opt.unmatch_name_only || opt.count)
+ && (opt.pre_context || opt.post_context ||
+ opt.file_break || opt.funcbody))
skip_first_line = 1;
start_threads(&opt);
}