From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#9480: 24.0.50; (vc-git) stash@{n} - requires shell quoting? Date: Mon, 12 Sep 2011 12:39:43 +0530 Message-ID: <81sjo2fd8o.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1315811453 8183 80.91.229.12 (12 Sep 2011 07:10:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2011 07:10:53 +0000 (UTC) To: 9480@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 12 09:10:49 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R30fH-0004q3-LF for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 09:10:47 +0200 Original-Received: from localhost ([::1]:43853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30fH-0008MB-6q for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2011 03:10:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30fD-0008Lv-Js for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R30fC-0006du-IC for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:43 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30fC-0006dq-FO for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R30jO-00058b-6i; Mon, 12 Sep 2011 03:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Sep 2011 07:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9480 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.131581166919686 (code B ref -1); Mon, 12 Sep 2011 07:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Sep 2011 07:14:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R30ir-00057T-DH for submit@debbugs.gnu.org; Mon, 12 Sep 2011 03:14:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R30io-00057K-UD for submit@debbugs.gnu.org; Mon, 12 Sep 2011 03:14:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R30eb-0006Xr-Qc for submit@debbugs.gnu.org; Mon, 12 Sep 2011 03:10:06 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:37699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30eb-0006Xm-NZ for submit@debbugs.gnu.org; Mon, 12 Sep 2011 03:10:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30ea-0008IE-J7 for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R30eZ-0006W3-6e for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:04 -0400 Original-Received: from mail-pz0-f44.google.com ([209.85.210.44]:55910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R30eZ-0006Vy-11 for bug-gnu-emacs@gnu.org; Mon, 12 Sep 2011 03:10:03 -0400 Original-Received: by pzk36 with SMTP id 36so7120175pzk.17 for ; Mon, 12 Sep 2011 00:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=YUA6oCLPgT3Zga/+SMC72G3X/Mk07BchkydjFR99Ujk=; b=VKBtBDG1dk4zMh0+PTl329YVMYJBkp57apFK9pClwXpWX1I0bDiF0GRA52EnlKChn8 ZeXeYPF0EoVD5hqBPmihP+OEGZrHXgJL18prOzQW33906219EC7Q1WmWfpjweUi6IkjG /gLs9LvBrEWEDppW1uGYJlVHrfEKrmMI3jd0g= Original-Received: by 10.68.22.102 with SMTP id c6mr199965pbf.158.1315811401556; Mon, 12 Sep 2011 00:10:01 -0700 (PDT) Original-Received: from JAMBU-NETBOOK ([115.242.149.42]) by mx.google.com with ESMTPS id f8sm25295372pbc.3.2011.09.12.00.09.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Sep 2011 00:10:00 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 12 Sep 2011 03:15:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.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:51038 Archived-At: --=-=-= Content-Type: text/plain 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)) `---- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vc-git.el.patch *** 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") --=-=-=--