diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-31 22:01:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-31 22:01:15 -0800 |
commit | 3e9e41659394fe5de085c90f4f86858062dfa47d (patch) | |
tree | cce6f05b79900447ee4d56067ef9da7376b449f0 /builtin | |
parent | fc75ad72dc7955d3077db4a72818d24de007a582 (diff) | |
parent | 50dd0f2fd910d9973760db052897ee8e73ed2f1f (diff) | |
download | git-3e9e41659394fe5de085c90f4f86858062dfa47d.tar.gz git-3e9e41659394fe5de085c90f4f86858062dfa47d.tar.xz |
Merge branch 'tr/grep-l-with-decoration'
* tr/grep-l-with-decoration:
grep: fix -l/-L interaction with decoration lines
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 9ce064ac1..5c2ae94e5 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); } |