Commit Diff


commit - 0a3316a6bbe71808e10cf1f5140690a111ba66c1
commit + ad36649b9f3ca7c730976bc4645986f86e71ec63
blob - aaecfe60defa7b8542eb4df286636a16b71c439a
blob + 86e3a297f1865d10dede1a1b081e9f9e789b20cf
--- vc-got.el
+++ vc-got.el
@@ -547,12 +547,13 @@ FILES is nil, consider all the files in DIR."
 (defun vc-got-checkin (files comment &optional _rev)
   "Commit FILES with COMMENT as commit message."
   (with-temp-buffer
-    (vc-got--call "commit" "-m"
-                  ;; emacs add ``Summary:'' at the start of the commit
-                  ;; message.  vc-git doesn't seem to treat this specially.
-                  ;; Since it's annoying, remove it.
-                  (string-remove-prefix "Summary: " comment)
-                  files)))
+    (unless (zerop (vc-got--call "commit" "-m"
+                                 ;; emacs add ``Summary:'' at the start of the commit
+                                 ;; message.  vc-git doesn't seem to treat this specially.
+                                 ;; Since it's annoying, remove it.
+                                 (string-remove-prefix "Summary: " comment)
+                                 files))
+      (error (buffer-string)))))
 
 (defun vc-got-find-revision (file rev buffer)
   "Fill BUFFER with the content of FILE in the given revision REV."