Skip to content

Commit

Permalink
sisyphus-bump-copyright: Commit silently
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Jan 1, 2024
1 parent 777e1cb commit be88b9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sisyphus.el
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ With prefix argument NOCOMMIT, do not create a commit."
(magit--disable-save-buffers t))
(sisyphus--bump-copyright))
(unless nocommit
(sisyphus--commit "Bump copyright years"))))
(sisyphus--commit "Bump copyright years" nil t))))

;;; Macros

Expand Down Expand Up @@ -380,11 +380,12 @@ With prefix argument NOCOMMIT, do not create a commit."
(copyright-query nil))
(copyright-update))))

(defun sisyphus--commit (msg &optional allow-empty)
(defun sisyphus--commit (msg &optional allow-empty no-edit)
(let ((magit-inhibit-refresh t))
(magit-stage-1 "-u"))
(magit-commit-create
(list "--edit" "--message" msg
(and no-edit "--no-edit")
(if (eq transient-current-command 'magit-tag)
(and-let* ((key (transient-arg-value
"--local-user=" (transient-args 'magit-tag))))
Expand Down

0 comments on commit be88b9e

Please sign in to comment.