Re: [PATCH/RFC] blame: respect "core.ignorecase"
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2012, 21:41 UTC
- Message-ID
- <20120910214152.GA2139@sigill.intra.peff.net>
- In-Reply-To
- <7vtxv5lfsv.fsf@alter.siamese.dyndns.org>
On Mon, Sep 10, 2012 at 02:38:08PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > Thanks, that helped. I got excited when I saw the "icase" in the > > comments and thought it might already be implemented. But it looks like > > it is still to be done. :) > > Yeah, some are tongue-in-cheek (e.g. I do not know what "recursive > pathspec" even means), but "noglob" probably is an urgent need from > correctness point of view for people who are writing Porcelain and > want to interact with a history that records funny filenames. > Currently you can "git <cmd> 'foo\*'" to match a path that is > exactly 'foo*' (because it matches) but you also have to hope there > is no other paths that happens to match that pattern. A script that > grabs paths out of ls-files output and then tries to use them as > pathspec would want to have a way to say "This is literal. Do not > honor globs in it".
I agree that the automatic globbing is currently a problem (although one that comes up quite infrequently; I guess people use sane pathnames). But I would think for that particular use case, you would not want to do a per-glob prefix for that, but would rather use a command-line switch. IOW, would you rather do:
git ls-files |
while read fn; do
echo ":(noglob)$fn"
done |
xargs git log --stdin --or:
git ls-files | xargs git log --stdin --no-glob-pathspec --
?
-Peff