diff options
| -rw-r--r-- | lisp/vc/vc-git.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b5959d535c0..afaaa44e908 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -1041,12 +1041,13 @@ It is based on `log-edit-mode', and has Git-specific extensions." | |||
| 1041 | (string-replace file-diff "" vc-git-patch-string)) | 1041 | (string-replace file-diff "" vc-git-patch-string)) |
| 1042 | (user-error "Index not empty")) | 1042 | (user-error "Index not empty")) |
| 1043 | (setq pos (point)))))) | 1043 | (setq pos (point)))))) |
| 1044 | (let ((patch-file (make-nearby-temp-file "git-patch"))) | 1044 | (unless (string-empty-p vc-git-patch-string) |
| 1045 | (with-temp-file patch-file | 1045 | (let ((patch-file (make-nearby-temp-file "git-patch"))) |
| 1046 | (insert vc-git-patch-string)) | 1046 | (with-temp-file patch-file |
| 1047 | (unwind-protect | 1047 | (insert vc-git-patch-string)) |
| 1048 | (vc-git-command nil 0 patch-file "apply" "--cached") | 1048 | (unwind-protect |
| 1049 | (delete-file patch-file)))) | 1049 | (vc-git-command nil 0 patch-file "apply" "--cached") |
| 1050 | (delete-file patch-file))))) | ||
| 1050 | (cl-flet ((boolean-arg-fn | 1051 | (cl-flet ((boolean-arg-fn |
| 1051 | (argument) | 1052 | (argument) |
| 1052 | (lambda (value) (when (equal value "yes") (list argument))))) | 1053 | (lambda (value) (when (equal value "yes") (list argument))))) |