GNU bug report logs - #9784
24.0.50; vc-git-stash-show not escaping name

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Tue, 18 Oct 2011 14:51:02 UTC

Severity: normal

Merged with 9480

Found in version 24.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9784 in the body.
You can then email your comments to 9784 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#9784; Package emacs. (Tue, 18 Oct 2011 14:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to joaotavora <at> gmail.com (João Távora):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Oct 2011 14:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; vc-git-stash-show not escaping name
Date: Tue, 18 Oct 2011 15:48:21 +0100
1. Start emacs -Q
2. Find a file in a git repository with a stash named stash@{0}
3. Try to show a stash
4. Be presented with an error message like

    fatal: ambiguous argument 'stash <at> 0': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions

The problem seems to happen because the curly braces in the stash name
aren't shell-quoted. Using `shell-quote-argument' in `vc-git-command'
helps...

(defun vc-git-command (buffer okstatus file-or-list &rest flags)
  "A wrapper around `vc-do-command' for use in vc-git.el.
The difference to vc-do-command is that this function always invokes
`vc-git-program'."
  (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
         file-or-list (mapcar #'shell-quote-argument flags)))

Thanks!
João Távora



In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-02 on YAMALOK
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --cflags  -m32 -O2 -g0 -march=prescott -mtune=prescott -pipe -IC:/gnuwin32/emacs/include -IC:/gnuwin32/emacs/lib -IC:/gnuwin32/src --ldflags  -s '

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  delete-selection-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  display-time-mode: t
  autopair-mode: t
  autopair-global-mode: t
  global-hl-line-mode: t
  recentf-mode: t
  show-paren-mode: t
  ido-everywhere: t
  global-hs-mode: t
  eldoc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Recent input:
C-n C-n C-n C-n C-n C-n C-n C-p <help-echo> <down-mouse-1> 
<mouse-2> <help-echo> C-p C-p C-p C-n C-n C-n RET C-x 
b RET C-x C-b C-x b h e RET RET C-n C-n C-n C-n C-n 
C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-n C-n C-n C-e M-b M-b M-b 
M-b M-b M-b M-b M-b M-b M-b M-b M-b M-b M-b C-s C-w 
C-w C-w C-p C-n C-x i RET C-p C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-n C-e C-x o C-x b C-s C-s 
C-s RET M-x v c SPC g i t SPC s t a <tab> SPC s h o 
<tab> RET <tab> <tab> <M-backspace> s t a s h @ { 0 
C-e RET C-x b C-s RET C-n C-n C-e M-b C-h f s h e l 
l SPC e s <tab> <tab> <tab> <backspace> <backspace> 
<tab> <tab> q u o <tab> a r <tab> RET C-x C-o C-p C-n 
( s h e l l - q u o t e - a r g u m e n t SPC C-d C-e 
) C-c C-c C-p C-n C-M-x C-p C-n M-x M-p RET M-p M-p 
RET C-x b C-s C-s C-s RET M-x M-p RET M-p RET C-x 1 
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> C-x b C-s RET C-p C-n C-p C-n C-n C-n C-n 
C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p C-p C-p C-n 
C-p C-p C-p C-p C-a C-SPC C-n C-n C-n C-n C-n C-n C-n 
C-n C-e <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
<down-mouse-1> <mouse-1> M-x r e p o r t SPC e m a 
<tab> <return>

Recent messages:
Quit [3 times]
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark saved where search started
Making completion list...
Type C-x 4 C-o RET to restore the other window.
eval'ed contents of vc-git.el
vc-git-stash-show
Auto-saving...
Mark set

Load-path shadows:
z:/siscog/sc-slime/slime/hyperspec hides z:/siscog/sc-slime/cl-hyperspec/hyperspec
z:/siscog/sc-slime/cl-shell/completion hides z:/Vendor/ntemacs24/lisp/completion
z:/holy/share/emacs/common/site-lisp/package hides z:/Vendor/ntemacs24/lisp/emacs-lisp/package
z:/Vendor/ntemacs24/lisp/nxml/xmltok hides z:/holy/share/emacs/common/site-lisp/10hacks/xmltok
z:/Vendor/ntemacs24/lisp/progmodes/flymake hides z:/holy/share/emacs/common/site-lisp/10hacks/flymake
z:/Vendor/ntemacs24/lisp/linum hides z:/holy/share/emacs/common/site-lisp/20misc/linum
z:/holy/share/emacs/common/site-lisp/20misc/markdown-mode hides z:/holy/share/emacs/common/site-lisp/50ruby/markdown-mode

Features:
(shadow sort mail-extr gnus-msg emacsbug vc-annotate vc-bzr sha1
hex-util vc-sccs vc-cvs vc-rcs vc-dir ewoc bookmark apropos mule-diag
whitespace skeleton sh-script diff-mode ibuf-ext delsel cua-rect rect
dired-aux color crm sendmail url-util url-parse url-vars zenburn
color-theme vc-svn find-func animate bridge cltl2 ps-print ps-def lpr
fi-manual allegro-manual-data slime-indentation slime-banner slime-fancy
slime-fontifying-fu slime-package-fu slime-references slime-scratch
slime-presentations slime-fuzzy slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-parse slime-repl slime
hyperspec browse-url face-remap org-wl org-w3m org-vm org-rmail org-mhe
org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp
org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex
org-bbdb org warnings ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table
org-footnote org-src ob-comint ob-keys ob ob-eval org-complete pcomplete
org-list org-faces org-compat org-entities org-macs cal-menu calendar
cal-loaddefs cl-specs edebug multi-isearch cus-edit log-edit pcvs-util
add-log newcomment cus-start cus-load hippie-exp fill-column-indicator
debug executable vc-git tramp tramp-compat auth-source eieio byte-opt
bytecomp byte-compile tramp-loaddefs pp cygwin-mount ange-ftp ack grep
cedet yasnippet dropdown-list help-mode yaml-mode woman man assoc
highlight-regexp ruby-mode flymake perl-find-library cperl-mode
sgml-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln
nxml-rap nxml-util nxml-glyph nxml-enc xmltok time markdown-mode
noutline outline imenu cua-base autopair hl-line windmove uniquify
recentf tree-widget paren ido hideshowvis hideshow vc vc-dispatcher
sass-mode haml-mode derived gnus-cite gnus-art mm-uu mml2015 epg-config
mm-view mml-smime smime password-cache dig mailcap nnir gnus-sum
macroexp nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-int message format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus-range gnus gnus-ems
nnheader gnus-util time-date mail-utils mm-util mail-prsvr wid-edit
etags em-cmpl em-term term ehelp electric em-prompt esh-var esh-io
esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module
esh-mode esh-util server vc-ediff ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff dired-details+ advice
help-fns advice-preload dired-details dired-x dired view thingatpt
compile comint ring rcompile cc-mode cc-fonts easymenu cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt edmacro kmacro
ibuffer package reporter heretic-project easy-mmode holy cl tooltip
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp
w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button
faces cus-face files text-properties overlay md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9784; Package emacs. (Tue, 18 Oct 2011 16:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 9784 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: joaotavora <at> gmail.com (João Távora)
Cc: 9784 <at> debbugs.gnu.org
Subject: Re: bug#9784: 24.0.50; vc-git-stash-show not escaping name
Date: Tue, 18 Oct 2011 12:25:22 -0400
João Távora wrote:

>     fatal: ambiguous argument 'stash <at> 0': unknown revision or path not in the working tree.
>     Use '--' to separate paths from revisions

This sounds like http://debbugs.gnu.org/9480 .
It was concluded this was a Cygwin issue. Are you using Cygwin's bash shell?

> In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
>  of 2011-04-02 on YAMALOK
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (4.5) --cflags  -m32 -O2 -g0 -march=prescott -mtune=prescott -pipe -IC:/gnuwin32/emacs/include -IC:/gnuwin32/emacs/lib -IC:/gnuwin32/src --ldflags  -s '




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9784; Package emacs. (Tue, 18 Oct 2011 18:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 9784 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: joaotavora <at> gmail.com (João Távora)
Cc: 9784 <at> debbugs.gnu.org
Subject: Re: bug#9784: 24.0.50; vc-git-stash-show not escaping name
Date: Tue, 18 Oct 2011 14:02:48 -0400
forcemerge 9480 9784
thanks

>     fatal: ambiguous argument 'stash <at> 0': unknown revision or path not
>     in the working tree.  Use '--' to separate paths from revisions

This is a known problem due to the use of Cygwin from a non-Cygwin
program.  I.e. either use an Cygwin version of Emacs, or use
a non-Cygwin version of git, or try to set CYGWIN=noglob in your
process-environment.


        Stefan




Forcibly Merged 9480 9784. Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> debbugs.gnu.org. (Tue, 18 Oct 2011 19:16:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9784; Package emacs. (Wed, 19 Oct 2011 09:08:02 GMT) Full text and rfc822 format available.

Message #16 received at 9784 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Glenn Morris <rgm <at> gnu.org>
Cc: 9784 <at> debbugs.gnu.org
Subject: Re: bug#9784: 24.0.50; vc-git-stash-show not escaping name
Date: Wed, 19 Oct 2011 10:06:06 +0100
I see, setting CYGWIN=noglob works nicely. Thanks.

Feel free to mark this a duplicate and close it down.

On Tue, Oct 18, 2011 at 7:02 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
> forcemerge 9480 9784
> thanks
>
>>     fatal: ambiguous argument 'stash <at> 0': unknown revision or path not
>>     in the working tree.  Use '--' to separate paths from revisions
>
> This is a known problem due to the use of Cygwin from a non-Cygwin
> program.  I.e. either use an Cygwin version of Emacs, or use
> a non-Cygwin version of git, or try to set CYGWIN=noglob in your
> process-environment.
>
>
>        Stefan
>



-- 
João Távora




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Nov 2011 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.