Subject: bug#29303: closed (Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 28 Nov 2017 17:51:02 +0000

Your bug report

#29303: 25.2; vc-git-grep should shell-escape FILES

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29303: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29303
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#29303: 25.2; vc-git-grep should shell-escape FILES
From: Eli Zaretskii <[email-masked]>
To: Robert Pluim <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 28 Nov 2017 19:49:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Robert Pluim <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Gmane-Reply-To-List: yes
> Date: Tue, 28 Nov 2017 14:37:58 +0100
> 
> Eli, is patch #2 ok to go into emacs-26 or master?

I pushed it, thanks.

> Do you need a NEWS entry?

No, it's a bug fix.

Subject: 25.2; vc-git-grep should shell-escape FILES
From: Angus Lees <[email-masked]>
To: [email-masked]
Date: Wed, 15 Nov 2017 06:25:04 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

"git grep" is recursive.  Consequently, the globbing for FILES arg needs
to be done *inside* git, and not by the shell invoking git.

Specifically: `vc-git-grep` needs to shell-escape the FILES value after
`grep-read-files` (so `grep-files-aliases` continues to work) and before
calling `grep-expand-template` (which does no escaping itself).

 - Gus

In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.20)
 of 2017-09-12, modified by Debian built on trouble
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Debian GNU/Linux testing (buster)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-XrMyQe/emacs25-25.2+1=.
-fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_AU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  icomplete-mode: t
  iswitchb-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
uncompressing vc-git.el.gz...done
Note: file is write protected
Mark saved where search started [3 times]
Quit
Mark saved where search started [3 times]
Type "q" in help window to restore its previous buffer, C-M-v to scroll
help.
Making completion list...

mouse-2, RET: find function's definition
Auto-saving...

Load-path shadows:
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/25.2/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs25/site-lisp/flim/hex-util hides
/usr/share/emacs/25.2/lisp/hex-util
/usr/share/emacs25/site-lisp/flim/md4 hides /usr/share/emacs/25.2/lisp/md4
/usr/share/emacs/site-lisp/rst hides
/usr/share/emacs/25.2/lisp/textmodes/rst
/usr/share/emacs25/site-lisp/flim/sasl-ntlm hides
/usr/share/emacs/25.2/lisp/net/sasl-ntlm
/usr/share/emacs25/site-lisp/flim/sasl-cram hides
/usr/share/emacs/25.2/lisp/net/sasl-cram
/usr/share/emacs25/site-lisp/flim/ntlm hides
/usr/share/emacs/25.2/lisp/net/ntlm
/usr/share/emacs25/site-lisp/flim/hmac-def hides
/usr/share/emacs/25.2/lisp/net/hmac-def
/usr/share/emacs25/site-lisp/flim/sasl-digest hides
/usr/share/emacs/25.2/lisp/net/sasl-digest
/usr/share/emacs25/site-lisp/flim/hmac-md5 hides
/usr/share/emacs/25.2/lisp/net/hmac-md5
/usr/share/emacs25/site-lisp/flim/sasl hides
/usr/share/emacs/25.2/lisp/net/sasl
/home/gus/.emacs.d/elpa/seq-2.20/seq hides
/usr/share/emacs/25.2/lisp/emacs-lisp/seq
/home/gus/.emacs.d/elpa/let-alist-1.0.5/let-alist hides
/usr/share/emacs/25.2/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug sendmail debug jka-compr eieio-opt
speedbar sb-image ezimage dframe find-func pp grep pulse dired-x
term/xterm xterm git-rebase dockerfile-mode rx markdown-mode noutline
outline magit-obsolete magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-branch
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert
autorevert filenotify magit-process magit-margin magit-mode magit-git
magit-section magit-popup git-commit magit-utils crm log-edit message
rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log with-editor async-bytecomp async tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
format-spec dash sh-script smie executable yaml-mode make-mode dired-aux
js advice sgml-mode json map cc-mode cc-fonts cc-guess cc-menus cc-cmds
dabbrev misearch multi-isearch vc-git diff-mode easy-mmode edmacro
kmacro imenu go-mode url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap find-file ffap
thingatpt url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars etags xref cl-seq project eieio eieio-core
cl-macs compile comint ansi-color ring dired server icomplete iswitchb
paren cus-start cus-load cc-styles cc-align cc-engine cc-vars cc-defs
finder-inf info package epg-config seq byte-opt gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib debian-el
debian-el-loaddefs dpkg-dev-el dpkg-dev-el-loaddefs time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 492363 64694)
 (symbols 48 38692 0)
 (miscs 40 3877 2293)
 (strings 32 92434 6983)
 (string-bytes 1 2738138)
 (vectors 16 59458)
 (vector-slots 8 991712 39447)
 (floats 8 392 835)
 (intervals 56 16373 182)
 (buffers 976 66)