unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9480: 24.0.50; (vc-git) stash@{n} - requires shell quoting?
@ 2011-09-12  7:09 Jambunathan K
  2011-09-12  7:29 ` Eli Zaretskii
  2011-09-13 13:35 ` Stefan Monnier
  0 siblings, 2 replies; 20+ messages in thread
From: Jambunathan K @ 2011-09-12  7:09 UTC (permalink / raw)
  To: 9480

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]


While in a *vc-dir* buffer (backed by git) and trying to show or apply a
stash fails.

I am attaching "works for me" patch that shell-quotes stash@{n}
argument. With this "patch", the stash commands work as expected.

My shell-file-name is set to "bash" (cygwin version). My Emacs is

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-09-06 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'

Additional Info:

,----
| VC backend : Git
| Working dir: ~/src/org-mode/
| Branch     : master
| Remote     : orgmode@orgmode.org:org-mode.git
| Stash      :
|              {0}: On master: custom tables  <-----
`----

FWIW, the stash line has following keymap:

,----
| (keymap
|  (83 . vc-git-stash-snapshot)
|  (80 . vc-git-stash-pop-at-point)
|  (65 . vc-git-stash-apply-at-point)
|  (13 . vc-git-stash-show-at-point)
|  (61 . vc-git-stash-show-at-point)
|  (11 . vc-git-stash-delete-at-point)
|  (down-mouse-3 . vc-git-stash-menu)
|  (mouse-2 . ignore))
`----


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-git.el.patch --]
[-- Type: text/x-patch, Size: 1720 bytes --]

*** a/vc-git.el	Mon Sep 12 12:14:06 2011
--- b/vc-git.el	Mon Sep 12 12:16:41 2011
***************
*** 1066,1085 ****
    (interactive)
    (let ((stash (vc-git-stash-get-at-point (point))))
      (when (y-or-n-p (format "Remove stash %s ? " stash))
!       (vc-git--run-command-string nil "stash" "drop" (format "stash@%s" stash))
        (vc-dir-refresh))))
  
  (defun vc-git-stash-show-at-point ()
    (interactive)
!   (vc-git-stash-show (format "stash@%s" (vc-git-stash-get-at-point (point)))))
  
  (defun vc-git-stash-apply-at-point ()
    (interactive)
!   (vc-git-stash-apply (format "stash@%s" (vc-git-stash-get-at-point (point)))))
  
  (defun vc-git-stash-pop-at-point ()
    (interactive)
!   (vc-git-stash-pop (format "stash@%s" (vc-git-stash-get-at-point (point)))))
  
  (defun vc-git-stash-menu (e)
    (interactive "e")
--- 1066,1093 ----
    (interactive)
    (let ((stash (vc-git-stash-get-at-point (point))))
      (when (y-or-n-p (format "Remove stash %s ? " stash))
!       (vc-git--run-command-string nil "stash" "drop"
! 				  (shell-quote-argument
! 				   (format "stash@%s" stash)))
        (vc-dir-refresh))))
  
  (defun vc-git-stash-show-at-point ()
    (interactive)
!   (vc-git-stash-show
!    (shell-quote-argument
!     (format "stash@%s" (vc-git-stash-get-at-point (point))))))
  
  (defun vc-git-stash-apply-at-point ()
    (interactive)
!   (vc-git-stash-apply
!    (shell-quote-argument
!     (format "stash@%s" (vc-git-stash-get-at-point (point))))))
  
  (defun vc-git-stash-pop-at-point ()
    (interactive)
!   (vc-git-stash-pop
!    (shell-quote-argument
!     (format "stash@%s" (vc-git-stash-get-at-point (point))))))
  
  (defun vc-git-stash-menu (e)
    (interactive "e")

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-09-14 11:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12  7:09 bug#9480: 24.0.50; (vc-git) stash@{n} - requires shell quoting? Jambunathan K
2011-09-12  7:29 ` Eli Zaretskii
2011-09-12  9:05   ` Jambunathan K
2011-09-12 10:51     ` Eli Zaretskii
2011-09-12 11:22       ` Jambunathan K
2011-09-12 11:50         ` Antoine Levitt
2011-09-12 11:56           ` Eli Zaretskii
2011-09-13  4:46             ` Jambunathan K
2011-09-13  1:39         ` Richard Stallman
2011-09-13  4:03       ` Glenn Morris
2011-09-13  4:37         ` Eli Zaretskii
2011-09-13  5:14           ` Jambunathan K
2011-09-13  6:17           ` Jambunathan K
2011-09-13  6:54             ` Eli Zaretskii
2011-09-13 18:05               ` Stefan Monnier
2011-09-13 13:35 ` Stefan Monnier
2011-09-13 15:27   ` Eli Zaretskii
2011-09-13 18:21     ` Glenn Morris
2011-09-14 10:58       ` Jambunathan K
2011-09-14 11:57         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).