]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'vc-git--program-version'
authorEli Zaretskii <eliz@gnu.org>
Fri, 16 Feb 2018 09:30:29 +0000 (11:30 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 16 Feb 2018 09:30:29 +0000 (11:30 +0200)
* lisp/vc/vc-git.el (vc-git--program-version): Fix the function to
work with Git for Windows.

lisp/vc/vc-git.el

index 40aa0b26010b64ac6dfbcd6c778c6e98754b6ca4..7ebb72f2706a3940286266c905f8d6c5fa6e6467 100644 (file)
@@ -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")))))