[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 01/01: Use "~1" instead of "^" in vc-git.el to sp
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 01/01: Use "~1" instead of "^" in vc-git.el to specify the parent of a Git commit. |
Date: |
Fri, 21 Nov 2014 10:36:30 +0000 |
branch: emacs-24
commit 04ed42002130c7ae940eea8d5b9af9e11a60a055
Author: Eli Zaretskii <address@hidden>
Date: Fri Nov 21 12:34:59 2014 +0200
Use "~1" instead of "^" in vc-git.el to specify the parent of a Git commit.
lisp/vc/vc-git.el (vc-git-previous-revision): Use "~1" instead of
"^", since the latter is a special character for MS-Windows system
shells.
---
lisp/ChangeLog | 2 ++
lisp/vc/vc-git.el | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13bc0ba..1ce22d0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,8 @@
* vc/vc-git.el (vc-git-command, vc-git--call): Bind
coding-system-for-read and coding-system-for-write to
vc-git-commits-coding-system.
+ (vc-git-previous-revision): Use "~1" instead of "^", since the
+ latter is a special character for MS-Windows system shells.
2014-11-20 Michael Albinus <address@hidden>
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 0ff5ba2..ae6b13a 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -987,7 +987,11 @@ or BRANCH^ (where \"^\" can be repeated)."
(point)
(1- (point-max)))))))
(or (vc-git-symbolic-commit prev-rev) prev-rev))
- (vc-git--rev-parse (concat rev "^"))))
+ ;; We used to use "^" here, but that fails on MS-Windows if git is
+ ;; invoked via a batch file, in which case cmd.exe strips the "^"
+ ;; because it is a special character for cmd which process-file
+ ;; does not (and cannot) quote.
+ (vc-git--rev-parse (concat rev "~1"))))
(defun vc-git--rev-parse (rev)
(with-temp-buffer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 01/01: Use "~1" instead of "^" in vc-git.el to specify the parent of a Git commit.,
Eli Zaretskii <=