(defvar gitmerge-skip-regexp
;; We used to include "sync" in there, but in my experience it only
;; caused false positives. --Stef
- "back[- ]?port\\|cherry picked from commit\\|\\(do\\( no\\|n['’]\\)t\\|no need to\\) merge\\|\
-re-?generate\\|bump version\\|from trunk\\|Auto-commit"
+ (let ((skip "back[- ]?port\\|cherry picked from commit\\|\
+\\(do\\( no\\|n['’]\\)t\\|no need to\\) merge\\|\
+bump version\\|Auto-commit"))
+ (if noninteractive skip
+ ;; "Regenerate" is quite prone to false positives.
+ ;; We only want to skip merging things like AUTHORS and ldefs-boot.
+ ;; These should be covered by "bump version" and "auto-commit".
+ ;; It doesn't do much harm if we merge one of those files by mistake.
+ ;; So it's better to err on the side of false negatives.
+ (concat skip "\\|re-?generate\\|from trunk")))
"Regexp matching logs of revisions that might be skipped.
`gitmerge-missing' will ask you if it should skip any matches.")