From: Albert Yale <surfingalbert@gmail.com>
To: git@vger.kernel.org
Cc: trast@student.ethz.ch, rene.scharfe@lsrfire.ath.cx,
Albert Yale <surfingalbert@gmail.com>
Subject: [PATCH v2] Fix the result of "git grep [-l|-L] -C <num>"
Date: Mon, 23 Jan 2012 12:06:15 -0500 [thread overview]
Message-ID: <1327338375-48917-1-git-send-email-surfingalbert@gmail.com> (raw)
When combining "git grep [-l|-L]" with "-C <num>",
the first result is omitted.
Reviewed-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Albert Yale <surfingalbert@gmail.com>
---
builtin/grep.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 9ce064a..beebe20 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -1036,7 +1036,10 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
if (use_threads) {
if (opt.pre_context || opt.post_context || opt.file_break ||
opt.funcbody)
- skip_first_line = 1;
+ {
+ if( ! ( opt.name_only || opt.unmatch_name_only ) )
+ skip_first_line = 1;
+ }
start_threads(&opt);
}
#endif
--
1.7.8.3
reply other threads:[~2012-01-23 17:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327338375-48917-1-git-send-email-surfingalbert@gmail.com \
--to=surfingalbert@gmail.com \
--cc=git@vger.kernel.org \
--cc=rene.scharfe@lsrfire.ath.cx \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).