From: "Michał Kiedrowicz" <michal.kiedrowicz@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] grep: Add --directories option.
Date: Fri, 10 Jul 2009 18:48:28 +0200 [thread overview]
Message-ID: <20090710184828.63d123d0@gmail.com> (raw)
In-Reply-To: <7vmy7dufdp.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
>
> > It seems your patch still allows recursion, one level deep.
>
> I suspect what the patch wants to do may be fundamentally unworkable.
>
> Unlike GNU grep that takes its command line arguments literally as
> files and directories, we use them merely as pathspec filters, so...
>
> > $ git grep -l --directories=skip GNU compat/*
>
> ... while I think you should be able to compensate for this kind of
> "off-by-one" and make it appear to work, I do not think there is a
> good definition of which level it should stop if you run it with
> something like this (notice the single-quote around the pathspec to
> prevent it from getting expanded by the shell):
>
> git grep GNU 'compat/*/*'
>
To makes things simplier (but maybe not correct) I assumed that '*'
matches _any_ string, including '/', so any file in "compat/" (even
in subdirs) should be treated as a file specified on command line.
Michał Kiedrowicz
next prev parent reply other threads:[~2009-07-10 16:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 19:20 [PATCH/RFC] grep: Add --directories option Michał Kiedrowicz
2009-07-10 7:33 ` René Scharfe
2009-07-10 8:11 ` Junio C Hamano
2009-07-10 16:48 ` Michał Kiedrowicz [this message]
2009-07-10 16:41 ` Michał Kiedrowicz
2009-07-10 8:02 ` Stephen Boyd
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=20090710184828.63d123d0@gmail.com \
--to=michal.kiedrowicz@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rene.scharfe@lsrfire.ath.cx \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.