From: Alex Riesen <raa.lkml@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [RFC/PATCH] Making ce_path_match() more useful by accepting globs
Date: Mon, 26 Nov 2007 20:56:59 +0100 [thread overview]
Message-ID: <20071126195659.GC3675@steel.home> (raw)
In-Reply-To: <7vsl2ujc6x.fsf@gitster.siamese.dyndns.org>
Junio C Hamano, Sun, Nov 25, 2007 21:35:18 +0100:
> Currently, these do not work:
>
> git diff-files 't/*.sh'
> git diff-index HEAD 'xdiff/*.c'
> git update-index -g 'Documentation/howto/*.txt'
>
> This is because ce_path_match(), the underlying function that is used to
> see if a cache entry matches the set of pathspecs, only understands
> leading directory match.
>
> This teaches ce_path_match() to use the match_pathspec() used in
> git-ls-files, which knows about glob patterns.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
> [SORRY FOR A RESEND -- I screwed up the To: field of the previous message]
>
> * Having two different behaviours of pathspec matching has been
> bothering me for quite some time. The changes here look trivially
> correct and the result passes all the tests, but this is quite close
> to the core part of the system, and would benefit greatly from extra
> set of eyes.
How about doing the same what was done with recursive directory
walker (no, I'm not confusing pathname filters with paths)? Always
have the glob expansion for porcelain (git-diff, git-log, git-show),
and add a command-line option to activate for plumbing?
(Well, the oldtimers as yourself will probably find it hard to
separate git-diff-tree from git-diff).
prev parent reply other threads:[~2007-11-26 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 20:35 [RFC/PATCH] Making ce_path_match() more useful by accepting globs Junio C Hamano
2007-11-26 19:56 ` Alex Riesen [this message]
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=20071126195659.GC3675@steel.home \
--to=raa.lkml@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.org \
/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).