{"thread":{"id":"29432","subject":"[PATCH v2] Fix the result of \"git grep [-l|-L] -C <num>\"","startedAt":"2012-01-23T17:06:15Z","lastAt":"2012-01-23T17:06:15Z","messageCount":1,"participants":["Albert Yale"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"182971","messageId":"1327338375-48917-1-git-send-email-surfingalbert@gmail.com","threadId":"29432","inReplyTo":null,"subject":"[PATCH v2] Fix the result of \"git grep [-l|-L] -C <num>\"","fromName":"Albert Yale","fromEmail":"surfingalbert@gmail.com","sentAt":"2012-01-23T17:06:15Z","receivedAt":"2012-01-23T17:06:15Z","isPatch":true,"sender":{"key":"surfingalbert@gmail.com","avatar":null},"body":"When combining \"git grep [-l|-L]\" with \"-C <num>\",\nthe first result is omitted.\n\nReviewed-by: Thomas Rast <trast@student.ethz.ch>\nSigned-off-by: Albert Yale <surfingalbert@gmail.com>\n---\n builtin/grep.c |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/grep.c b/builtin/grep.c\nindex 9ce064a..beebe20 100644\n--- a/builtin/grep.c\n+++ b/builtin/grep.c\n@@ -1036,7 +1036,10 @@ int cmd_grep(int argc, const char **argv, const char *prefix)\n \tif (use_threads) {\n \t\tif (opt.pre_context || opt.post_context || opt.file_break ||\n \t\t    opt.funcbody)\n-\t\t\tskip_first_line = 1;\n+\t\t{\n+\t\t\tif( ! ( opt.name_only || opt.unmatch_name_only ) )\n+\t\t\t\tskip_first_line = 1;\n+\t\t}\n \t\tstart_threads(&opt);\n \t}\n #endif\n-- \n1.7.8.3\n"}]}