From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org
Subject: Re: [BUG/PATCH] git grep shows the same hit repeatedly for unmerged paths
Date: Thu, 06 Dec 2007 00:08:30 -0800 [thread overview]
Message-ID: <7v3auggs8x.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <4757A4DD.901@viscovery.net> (Johannes Sixt's message of "Thu, 06 Dec 2007 08:29:33 +0100")
Johannes Sixt <j.sixt@viscovery.net> writes:
> Junio C Hamano schrieb:
>> When the index is unmerged, e.g.
>>
>> $ git ls-files -u
>> 100644 faf413748eb6ccb15161a212156c5e348302b1b6 1 setup.c
>> 100644 145eca50f41d811c4c8fcb21ed2604e6b2971aba 2 setup.c
>> 100644 cb9558c49b6027bf225ba2a6154c4d2a52bcdbe2 3 setup.c
>>
>> running "git grep" for work tree files repeats hits for each unmerged
>> stage.
>>
>> $ git grep -n -e setup_work_tree -- '*.[ch]'
>> setup.c:209:void setup_work_tree(void)
>> setup.c:209:void setup_work_tree(void)
>> setup.c:209:void setup_work_tree(void)
>>
>> This should fix it.
>
> Does this change the behavior of grep --cached? IOW, listing the same hit
> more than once when --cached is given is a feature, IMHO.
Yeah, --cached should grep for each stage. It doesn't?
next prev parent reply other threads:[~2007-12-06 8:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 0:13 [BUG/PATCH] git grep shows the same hit repeatedly for unmerged paths Junio C Hamano
2007-12-06 7:29 ` Johannes Sixt
2007-12-06 8:08 ` Junio C Hamano [this message]
2007-12-06 8:24 ` Johannes Sixt
2007-12-06 8:59 ` 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=7v3auggs8x.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
/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).