From: Charles Bailey <charles@hashpling.org>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] grep: fix grepping for "intent to add" files
Date: Thu, 16 Jun 2016 12:44:52 +0100 [thread overview]
Message-ID: <20160616114452.GA21930@hashpling.org> (raw)
In-Reply-To: <CACsJy8Bp6Mv2D1QCsR6MWhW2XMedo2svQKHBrx8AgA1Le56Grw@mail.gmail.com>
On Thu, Jun 16, 2016 at 05:57:18PM +0700, Duy Nguyen wrote:
>
> "git grep --cached" searches file content that will be committed by
> "git commit" (no -a). An i-t-a entry will not be committed (you would
> need "git add" first, or do "git commit -a"). So if I say "search
> among the to-be-committed file content, list files that do not match
> abc" (git grep -l -v --cached abc), the i-t-a entry will show up
> because its fake content is empty (i.e. not contain "abc"), even
> though it's not in the "to-be-committed" list. So yeah, correctness
> issue.
OK, I think there is an issue there but it's not with "-l -v --cached"
but rather with "-L --cached". If my understanding is correct, "-l -v"
means "has a line that doesn't match" whereas "-L" means "has no line
that matches".
Does this sound correct? I'll try adding a new test.
next prev parent reply other threads:[~2016-06-16 11:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 6:53 [PATCH] grep: fix grepping for "intent to add" files Charles Bailey
2016-06-16 7:47 ` Duy Nguyen
2016-06-16 9:47 ` Charles Bailey
2016-06-16 10:57 ` Duy Nguyen
2016-06-16 11:44 ` Charles Bailey [this message]
2016-06-16 12:11 ` Duy Nguyen
2016-06-16 18:18 ` Junio C Hamano
2016-06-16 18:12 ` Junio C Hamano
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=20160616114452.GA21930@hashpling.org \
--to=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/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).