]> git.eshelyaron.com Git - emacs.git/commitdiff
Small improvement for noninteractive gitmerge
authorGlenn Morris <rgm@gnu.org>
Mon, 15 Jan 2018 20:43:16 +0000 (12:43 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 15 Jan 2018 20:43:16 +0000 (12:43 -0800)
* admin/gitmerge.el (gitmerge-resolve-unmerged):
In batch mode, report conflicted files.

admin/gitmerge.el

index 6011d9bd38f968ee7953754474c5963110734397..e676e8fa025521b3eadb4f73ad558406e12cbe58 100644 (file)
@@ -448,8 +448,13 @@ Throw an user-error if we cannot resolve automatically."
            (erase-buffer)
            (insert "For the following files, conflicts could\n"
                    "not be resolved automatically:\n\n")
-           (call-process "git" nil t nil
-                         "diff" "--name-only" "--diff-filter=U")
+           (let ((conflicts
+                  (with-temp-buffer
+                    (call-process "git" nil t nil
+                                  "diff" "--name-only" "--diff-filter=U")
+                    (buffer-string))))
+             (insert conflicts)
+             (if noninteractive (message "Conflicts in:\n%s" conflicts)))
            (insert "\nResolve the conflicts manually, then run gitmerge again."
                    "\nNote:\n  - You don't have to add resolved files or "
                    "commit the merge yourself (but you can)."