GNU bug report logs -
#19944
25.0.50; vc-git-grep doesn't use grep-read-files correctly
Previous Next
Reported by: Rupert Swarbrick <ruperts <at> broadcom.com>
Date: Wed, 25 Feb 2015 11:40:02 UTC
Severity: normal
Found in version 25.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 19944 <at> debbugs.gnu.org (full text, mbox):
Rupert Swarbrick <ruperts <at> broadcom.com> writes:
> The vc-git-grep function uses grep-read-files to figure out the list of
> files to check. This gets glued to the end of the git grep command
> line. With the default value of grep-files-aliases, if the user enters
> "all" for their files, grep-read-files returns the string "* .*".
>
> If you do the following:
>
> cd /path/to/my/git/repo
> git grep foo -- * .*
>
> then you get something like:
>
> /path/to/my/git/repo> git grep foo -- * .*
> fatal: ..: '..' is outside repository
>
> because .* expands to a list including "..".
(This bug report unfortunately got no response at the time.)
Looks like this has been fixed in more recent versions of Emacs. Trying
this, I get:
git --no-pager grep -n --color -i -e emacs -- \* .\[\!.\]\* ..\?\*
and everything works are it should, I think.
> We're also doing the wrong thing when the user gives a pattern. For
> example, if I go into the top-level Emacs directory and run
>
> M-x vc-git-grep
>
> enter vc-git-grep as the string to search for and enter *g* for the
> files to search, then I get:
>
> Grep started at Wed Feb 25 11:17:28
>
> git --no-pager grep -n -e vc-git-grep -- *g*
This, too -- I get:
git --no-pager grep -n --color -i -e emacs -- \*g\*
So I'm guessing this has been fixed, and I'm closing this bug report.
If there's still a problem here, please respond to the debbugs address,
and we'll reopen the bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.