cherry mark and search for `gitmerge-skip-regexp'. The result is
a list with entries of the form (SHA1 . SKIP), where SKIP denotes
if and why this commit should be skipped."
+ (message "Finding missing commits...")
(let (commits)
;; Go through the log and remember all commits that match
;; `gitmerge-skip-regexp' or are marked by --cherry-mark.
(when (re-search-forward gitmerge-skip-regexp nil t)
(setcdr (car commits) "R"))))))
(delete-region (point) (point-max))))
+ (message "Finding missing commits...done")
(nreverse commits)))
(defun gitmerge-setup-log-buffer (commits from)
(not (gitmerge-repo-clean)))
(user-error "Repository is not clean"))
(when statusexist
- (if (not (y-or-n-p "Resume merge? "))
+ (if (or noninteractive (not (y-or-n-p "Resume merge? ")))
(progn
(delete-file gitmerge-status-file)
;; No resume.
(list
(if (gitmerge-maybe-resume)
'resume
- (completing-read "Merge branch: " (gitmerge-get-all-branches)
- nil t (gitmerge-default-branch)))))))
+ (if noninteractive
+ (or (pop command-line-args-left)
+ (gitmerge-default-branch))
+ (completing-read "Merge branch: "
+ (gitmerge-get-all-branches)
+ nil t (gitmerge-default-branch))))))))
(let ((default-directory (vc-git-root default-directory)))
(if (eq from 'resume)
(progn
"(C) Detected backport (cherry-mark), (R) Log matches "
"regexp, (M) Manually picked\n\n")
(gitmerge-mode)
- (pop-to-buffer (current-buffer))))))
+ (pop-to-buffer (current-buffer))
+ (if noninteractive (gitmerge-start-merge))))))
(defun gitmerge-start-merge ()
(interactive)