[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When was a change installed?

From: Damien Wyart
Subject: Re: When was a change installed?
Date: Wed, 19 Aug 2015 12:16:32 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

> > > $ git grep lax-whitespace */ChangeLog*
> > > without the single quotes works for me.

> > That's not the same, as the glob is expanded by the shell before git
> > can see it.

* Stephen Berman <address@hidden> [2015-08-19 11:57]:
> The error message by git, which I also get on invoking
>   git grep lax-whitespace '*/ChangeLog.*'
> says "Use '--' to separate paths from revisions, like this: 'git
> <command> [<revision>...]  -- [<file>...]'", and indeed, when I run
>   git grep lax-whitespace -- '*/ChangeLog.*'
> it outputs 26 matching lines.  Invoking
>   git grep lax-whitespace */ChangeLog*
> outputs only 25 of thos lines, all from lisp/; missing is
>   "doc/emacs/ChangeLog.1:     (Replace): Document replace-lax-whitespace."
> which the other output contains.

> So you're right there's a difference, but apparently the '--' is necessary.

I guess Andreas is using git 2.5.0, where '--' is not necessary anymore
in this case.

Here is the corresponding item from the release notes:

|  * A heuristic we use to catch mistyped paths on the command line
|   "git <cmd> <revs> <pathspec>" is to make sure that all the non-rev
|    parameters in the later part of the command line are names of the
|    files in the working tree, but that means "git grep $str -- \*.c"
|    must always be disambiguated with "--", because nobody sane will
|    create a file whose name literally is asterisk-dot-see.  Loosen the
|    heuristic to declare that with a wildcard string the user likely
|    meant to give us a pathspec.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]