update packages and add valign
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; magit-merge.el --- Merge functionality -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2008-2025 The Magit Project Contributors
|
||||
;; Copyright (C) 2008-2026 The Magit Project Contributors
|
||||
|
||||
;; Author: Jonas Bernoulli <emacs.magit@jonas.bernoulli.dev>
|
||||
;; Maintainer: Jonas Bernoulli <emacs.magit@jonas.bernoulli.dev>
|
||||
@@ -95,8 +95,10 @@ the user inspect the result. With a prefix argument pretend the
|
||||
merge failed to give the user the opportunity to inspect the
|
||||
merge.
|
||||
|
||||
To create an octopus-merge, separate branches with commas.
|
||||
|
||||
\(git merge --no-edit|--no-commit [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
(interactive (list (magit-read-other-branches-or-commits "Merge")
|
||||
(magit-merge-arguments)
|
||||
current-prefix-arg))
|
||||
(magit-merge-assert)
|
||||
@@ -105,24 +107,30 @@ merge.
|
||||
;;;###autoload
|
||||
(defun magit-merge-editmsg (rev &optional args)
|
||||
"Merge commit REV into the current branch; and edit message.
|
||||
|
||||
Perform the merge and prepare a commit message but let the user
|
||||
edit it.
|
||||
\n(git merge --edit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
|
||||
To create an octopus-merge, separate branches with commas.
|
||||
|
||||
\(git merge --edit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branches-or-commits "Merge")
|
||||
(magit-merge-arguments)))
|
||||
(magit-merge-assert)
|
||||
(cl-pushnew "--no-ff" args :test #'equal)
|
||||
(apply #'magit-run-git-with-editor "merge" "--edit"
|
||||
(append (delete "--ff-only" args)
|
||||
(list rev))))
|
||||
(magit-run-git-with-editor "merge" "--edit" (delete "--ff-only" args) rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-nocommit (rev &optional args)
|
||||
"Merge commit REV into the current branch; pretending it failed.
|
||||
|
||||
Pretend the merge failed to give the user the opportunity to
|
||||
inspect the merge and change the commit message.
|
||||
\n(git merge --no-commit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
|
||||
To create an octopus-merge, separate branches with commas.
|
||||
|
||||
\(git merge --no-commit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branches-or-commits "Merge")
|
||||
(magit-merge-arguments)))
|
||||
(magit-merge-assert)
|
||||
(cl-pushnew "--no-ff" args :test #'equal)
|
||||
@@ -139,12 +147,12 @@ obsolete version of the commits that are being merged. Finally
|
||||
if `forge-branch-pullreq' was used to create the merged branch,
|
||||
then also remove the respective remote branch."
|
||||
(interactive
|
||||
(list (let ((branch (magit-get-current-branch)))
|
||||
(magit-read-other-local-branch
|
||||
(format "Merge `%s' into" (or branch (magit-rev-parse "HEAD")))
|
||||
nil
|
||||
(and branch (magit-get-local-upstream-branch branch))))
|
||||
(magit-merge-arguments)))
|
||||
(list (let ((branch (magit-get-current-branch)))
|
||||
(magit-read-other-local-branch
|
||||
(format "Merge `%s' into" (or branch (magit-rev-parse "HEAD")))
|
||||
nil
|
||||
(and branch (magit-get-local-upstream-branch branch))))
|
||||
(magit-merge-arguments)))
|
||||
(let ((current (magit-get-current-branch))
|
||||
(head (magit-rev-parse "HEAD")))
|
||||
(when (zerop (magit-call-git "checkout" branch))
|
||||
@@ -240,15 +248,15 @@ then also remove the respective remote branch."
|
||||
(defun magit-checkout-stage (file arg)
|
||||
"During a conflict checkout and stage side, or restore conflict."
|
||||
(interactive
|
||||
(let ((file (magit-completing-read "Checkout file"
|
||||
(magit-tracked-files) nil 'any nil
|
||||
'magit-read-file-hist
|
||||
(magit-current-file))))
|
||||
(cond ((member file (magit-unmerged-files))
|
||||
(list file (magit-checkout-read-stage file)))
|
||||
((yes-or-no-p (format "Restore conflicts in %s? " file))
|
||||
(list file "--merge"))
|
||||
((user-error "Quit")))))
|
||||
(let ((file (magit-completing-read "Checkout file"
|
||||
(magit-tracked-files) nil 'any nil
|
||||
'magit-read-file-hist
|
||||
(magit-current-file))))
|
||||
(cond ((member file (magit-unmerged-files))
|
||||
(list file (magit-checkout-read-stage file)))
|
||||
((yes-or-no-p (format "Restore conflicts in %s? " file))
|
||||
(list file "--merge"))
|
||||
((user-error "Quit")))))
|
||||
(pcase (cons arg (cddr (car (magit-file-status file))))
|
||||
((or `("--ours" ?D ,_)
|
||||
'("--ours" ?U ?A)
|
||||
@@ -317,6 +325,7 @@ If no merge is in progress, do nothing."
|
||||
;; ("and>" . "cond-let--and>")
|
||||
;; ("and-let" . "cond-let--and-let")
|
||||
;; ("if-let" . "cond-let--if-let")
|
||||
;; ("when$" . "cond-let--when$")
|
||||
;; ("when-let" . "cond-let--when-let")
|
||||
;; ("while-let" . "cond-let--while-let")
|
||||
;; ("match-string" . "match-string")
|
||||
|
||||
Reference in New Issue
Block a user