diff options
| author | Eli Zaretskii | 2018-02-16 11:30:29 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-02-16 11:30:29 +0200 |
| commit | 6ddb4bd39ac0629e4e06221a41120aee7c18f548 (patch) | |
| tree | eb33b0873aeff4a1a20a9f9c5df00e88b915980f | |
| parent | 63c93f7ecd469cd8267f2c7c87530341a157b144 (diff) | |
| download | emacs-6ddb4bd39ac0629e4e06221a41120aee7c18f548.tar.gz emacs-6ddb4bd39ac0629e4e06221a41120aee7c18f548.zip | |
Fix 'vc-git--program-version'
* lisp/vc/vc-git.el (vc-git--program-version): Fix the function to
work with Git for Windows.
| -rw-r--r-- | lisp/vc/vc-git.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 40aa0b26010..7ebb72f2706 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." | |||
| 239 | (vc-git--run-command-string nil "version"))) | 239 | (vc-git--run-command-string nil "version"))) |
| 240 | (setq vc-git--program-version | 240 | (setq vc-git--program-version |
| 241 | (if (and version-string | 241 | (if (and version-string |
| 242 | (string-match "git version \\([0-9.]+\\)$" | 242 | ;; Git for Windows appends ".windows.N" to the |
| 243 | version-string)) | 243 | ;; numerical version reported by Git. |
| 244 | (string-match | ||
| 245 | "git version \\([0-9.]+\\)\\(\.windows.[0-9]+\\)$" | ||
| 246 | version-string)) | ||
| 244 | (match-string 1 version-string) | 247 | (match-string 1 version-string) |
| 245 | "0"))))) | 248 | "0"))))) |
| 246 | 249 | ||