[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 6ddb4bd: Fix 'vc-git--program-version'
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 6ddb4bd: Fix 'vc-git--program-version' |
Date: |
Fri, 16 Feb 2018 04:31:17 -0500 (EST) |
branch: emacs-26
commit 6ddb4bd39ac0629e4e06221a41120aee7c18f548
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix 'vc-git--program-version'
* lisp/vc/vc-git.el (vc-git--program-version): Fix the function to
work with Git for Windows.
---
lisp/vc/vc-git.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 40aa0b2..7ebb72f 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -239,8 +239,11 @@ Should be consistent with the Git config value
i18n.logOutputEncoding."
(vc-git--run-command-string nil "version")))
(setq vc-git--program-version
(if (and version-string
- (string-match "git version \\([0-9.]+\\)$"
- version-string))
+ ;; Git for Windows appends ".windows.N" to the
+ ;; numerical version reported by Git.
+ (string-match
+ "git version \\([0-9.]+\\)\\(\.windows.[0-9]+\\)$"
+ version-string))
(match-string 1 version-string)
"0")))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 6ddb4bd: Fix 'vc-git--program-version',
Eli Zaretskii <=