diff options
| author | Glenn Morris | 2017-12-18 19:56:21 -0500 |
|---|---|---|
| committer | Glenn Morris | 2017-12-18 19:56:21 -0500 |
| commit | 066b65d03d4e6a1f666917fcea78998f3d001873 (patch) | |
| tree | a7eae1cde12b37ecec918ffc0fbd5030d4b56daa /admin | |
| parent | 2a8d2d5daf55fe70ce3c07c0f0140835f952f56a (diff) | |
| download | emacs-066b65d03d4e6a1f666917fcea78998f3d001873.tar.gz emacs-066b65d03d4e6a1f666917fcea78998f3d001873.zip | |
Set minimum number of commits for gitmerge in batch mode
* admin/gitmerge.el (gitmerge-minimum-missing): New variable.
(gitmerge): In batch mode, respect gitmerge-minimum-missing.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/gitmerge.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/admin/gitmerge.el b/admin/gitmerge.el index ba9f2b8f808..4bc946e144b 100644 --- a/admin/gitmerge.el +++ b/admin/gitmerge.el | |||
| @@ -63,6 +63,9 @@ bump version\\|Auto-commit")) | |||
| 63 | "Regexp matching logs of revisions that might be skipped. | 63 | "Regexp matching logs of revisions that might be skipped. |
| 64 | `gitmerge-missing' will ask you if it should skip any matches.") | 64 | `gitmerge-missing' will ask you if it should skip any matches.") |
| 65 | 65 | ||
| 66 | (defvar gitmerge-minimum-missing 10 | ||
| 67 | "Minimum number of missing commits to consider merging in batch mode.") | ||
| 68 | |||
| 66 | (defvar gitmerge-status-file (expand-file-name "gitmerge-status" | 69 | (defvar gitmerge-status-file (expand-file-name "gitmerge-status" |
| 67 | user-emacs-directory) | 70 | user-emacs-directory) |
| 68 | "File where missing commits will be saved between sessions.") | 71 | "File where missing commits will be saved between sessions.") |
| @@ -567,6 +570,12 @@ Branch FROM will be prepended to the list." | |||
| 567 | (setq gitmerge--from from) | 570 | (setq gitmerge--from from) |
| 568 | (when (null gitmerge--commits) | 571 | (when (null gitmerge--commits) |
| 569 | (user-error "Nothing to merge")) | 572 | (user-error "Nothing to merge")) |
| 573 | (and noninteractive | ||
| 574 | gitmerge-minimum-missing | ||
| 575 | (< (length gitmerge--commits) gitmerge-minimum-missing) | ||
| 576 | (user-error "Number of missing commits (%s) is less than %s" | ||
| 577 | (length gitmerge--commits) | ||
| 578 | gitmerge-minimum-missing)) | ||
| 570 | (with-current-buffer | 579 | (with-current-buffer |
| 571 | (gitmerge-setup-log-buffer gitmerge--commits gitmerge--from) | 580 | (gitmerge-setup-log-buffer gitmerge--commits gitmerge--from) |
| 572 | (goto-char (point-min)) | 581 | (goto-char (point-min)) |