mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 16:24:18 +00:00
Ancestry path for babies
This commit is contained in:
parent
ddba094cdb
commit
8cac2ded8c
1 changed files with 14 additions and 0 deletions
|
|
@ -55,12 +55,26 @@
|
|||
(magit-run-git-async "worktree" "add" (if force "-B" "-b")
|
||||
branch (magit--expand-worktree path) start-point))
|
||||
|
||||
(defun magit-show-ancestor-merges (revs &optional args files)
|
||||
(interactive (cons (magit-read-starting-point "Ancestry path for: ")
|
||||
(magit-diff-arguments)))
|
||||
(let ((flags "--merges --oneline --reverse --first-parent"))
|
||||
(async-shell-command
|
||||
(shell-and
|
||||
(format "git --no-pager log --oneline %s~1..%s"
|
||||
revs revs)
|
||||
(format "git --no-pager log %s %s..origin/main | cut -c -70 | head -n 10"
|
||||
flags revs)))))
|
||||
|
||||
(transient-append-suffix 'magit-worktree "b"
|
||||
'("B" "[async] worktree" my/magit-worktree-checkout))
|
||||
|
||||
(transient-append-suffix 'magit-worktree "c"
|
||||
'("C" "[async] branch and worktree" my/magit-worktree-branch))
|
||||
|
||||
(transient-append-suffix 'magit-log "s"
|
||||
'("A" "Ancestry path" magit-show-ancestor-merges))
|
||||
|
||||
;; This is fixed in 5478d4e of magit/transient (committed )
|
||||
;; (require 'transient-bug)
|
||||
;; (with-eval-after-load 'vertico-multiform
|
||||
|
|
|
|||
Loading…
Reference in a new issue