From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#22577: 25.0.50; vc-git-grep fails when searching for `all' files Date: Sun, 07 Feb 2016 04:17:03 +0100 Message-ID: <878u2xyztc.fsf@telefonica.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454815105 13284 80.91.229.3 (7 Feb 2016 03:18:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2016 03:18:25 +0000 (UTC) To: 22577@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 07 04:18:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aSFrX-00006o-TL for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Feb 2016 04:18:12 +0100 Original-Received: from localhost ([::1]:59044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFrX-0006Gq-7f for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Feb 2016 22:18:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFrU-0006G2-0T for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:18:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSFrP-0001GG-15 for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:18:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFrO-0001GC-Tk for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSFrO-0003vK-NT for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2016 03:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145481504115028 (code B ref -1); Sun, 07 Feb 2016 03:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2016 03:17:21 +0000 Original-Received: from localhost ([127.0.0.1]:36228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSFqi-0003uK-Nz for submit@debbugs.gnu.org; Sat, 06 Feb 2016 22:17:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34353) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSFqg-0003u6-Ar for submit@debbugs.gnu.org; Sat, 06 Feb 2016 22:17:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSFqa-0001A8-9v for submit@debbugs.gnu.org; Sat, 06 Feb 2016 22:17:13 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFqa-0001A4-6n for submit@debbugs.gnu.org; Sat, 06 Feb 2016 22:17:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFqZ-0006Bq-7t for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:17:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSFqU-00019r-8G for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:17:11 -0500 Original-Received: from relaycp03.dominioabsoluto.net ([217.116.26.84]:46742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSFqU-00017q-0o for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2016 22:17:06 -0500 Original-Received: from smtp.movistar.es (smtp08.acens.net [86.109.99.132]) by relaycp03.dominioabsoluto.net (Postfix) with ESMTP id 2CC08BFA130 for ; Sun, 7 Feb 2016 04:17:04 +0100 (CET) X-CTCH-RefID: str=0001.0A0B0203.56B6B730.0027, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Original-Received: from qcore (83.38.42.1) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 56A8ACDF00D217A3 for bug-gnu-emacs@gnu.org; Sun, 7 Feb 2016 03:17:04 +0000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112590 Archived-At: emacs -Q M-x vc-dir M-x vc-git-grep Search for: foo Search for "foo" in files (default all): In directory: 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