emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#22577: closed (25.0.50; vc-git-grep fails when sea


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22577: closed (25.0.50; vc-git-grep fails when searching for `all' files)
Date: Sun, 14 Feb 2016 15:25:02 +0000

Your message dated Sun, 14 Feb 2016 16:24:26 +0100
with message-id <address@hidden>
and subject line Re: bug#22577: 25.0.50; vc-git-grep fails when searching for 
`all' files
has caused the debbugs.gnu.org bug report #22577,
regarding 25.0.50; vc-git-grep fails when searching for `all' files
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
22577: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22577
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.50; vc-git-grep fails when searching for `all' files Date: Sun, 07 Feb 2016 04:17:03 +0100
emacs -Q
M-x vc-dir <top directory of a git repo. Emacs' for instance>
M-x vc-git-grep
Search for: foo
Search for "foo" in files (default all): <ENTER (accept default)>
In directory: <ENTER (accept default)>

The command fails with

-*- mode: grep; default-directory: "~/dev/emacs/emacs/" -*-
Grep started at Sun Feb  7 03:54:09

git --no-pager grep -n -e VC -- * .*
fatal: ..: '..' is outside repository

Grep exited abnormally with code 128 at Sun Feb  7 03:54:09


The problem consists on `all' defaulting to the file patterns "* .*", as
defined in the variable `grep-files-aliases'. Those patterns matches
".." (the parent directory) which is outside the git repo (when you
execute vc-git-grep on the top directory of the repo.)

BTW, this pattern creates unnecesary noise when used with the `grep'
commands, adding to the grep output lines such as

grep: .: Is a directory
grep: ..: Is a directory

I propose the following patch to fix this problem. Shell gurus, please
review.

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 7e6f157..3f77a2a 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -189,7 +189,7 @@ grep-find-template
   :group 'grep)
 
 (defcustom grep-files-aliases
-  '(("all" .   "* .*")
+  '(("all" .   "* .[^\\.]*")
     ("el" .    "*.el")
     ("ch" .    "*.[ch]")
     ("c" .     "*.c")


In GNU Emacs 25.0.50.29 (x86_64-unknown-linux-gnu, X toolkit)
 of 2016-01-21 built on qcore
Repository revision: 5293d1bdb3e665a565af032a163004c976328cc2
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description:     Ubuntu 15.10

Configured using:
 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2
FREETYPE XFT ZLIB LUCID X11

Important settings:
  value of $LANG: C
  locale-coding-system: nil

Major mode: Emacs-Lisp



--- End Message ---
--- Begin Message --- Subject: Re: bug#22577: 25.0.50; vc-git-grep fails when searching for `all' files Date: Sun, 14 Feb 2016 16:24:26 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
Fixed on 856cd948d1a5a016ad36721246a049d33451902f.

The final pattern matches names starting with two dots too.


--- End Message ---

reply via email to

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