fix magit update
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
(&optional branch pull keyword))
|
||||
(declare-function magit-read-file-from-rev "magit-files"
|
||||
(rev prompt &optional default))
|
||||
(declare-function magit-rebase--get-state-lines "magit-sequence"
|
||||
(file))
|
||||
(declare-function magit-show-commit "magit-diff"
|
||||
(arg1 &optional arg2 arg3 arg4))
|
||||
(declare-function magit-reflog-format-subject "magit-reflog" (subject))
|
||||
@@ -437,20 +439,21 @@ the upstream isn't ahead of the current branch) show."
|
||||
("-p" "Show diffs" ("-p" "--patch")) ;2
|
||||
("-s" "Show diffstats" "--stat")] ;2
|
||||
[["Log"
|
||||
("l" "current" magit-log-current)
|
||||
("o" "other" magit-log-other)
|
||||
("h" "HEAD" magit-log-head)]
|
||||
("l" "current" magit-log-current)
|
||||
("h" "HEAD" magit-log-head)
|
||||
("u" "related" magit-log-related)
|
||||
("o" "other" magit-log-other)]
|
||||
[""
|
||||
("L" "local branches" magit-log-branches)
|
||||
("L" "local branches" magit-log-branches)
|
||||
("b" "all branches" magit-log-all-branches)
|
||||
("a" "all references" magit-log-all)
|
||||
(7 "B" "matching branches" magit-log-matching-branches)
|
||||
(7 "T" "matching tags" magit-log-matching-tags)
|
||||
("b" "all branches" magit-log-all-branches)
|
||||
("a" "all references" magit-log-all)
|
||||
(7 "m" "merged" magit-log-merged)]
|
||||
(7 "T" "matching tags" magit-log-matching-tags)
|
||||
(7 "m" "merged" magit-log-merged)]
|
||||
["Reflog"
|
||||
("r" "current" magit-reflog-current)
|
||||
("O" "other" magit-reflog-other)
|
||||
("H" "HEAD" magit-reflog-head)]
|
||||
("r" "current" magit-reflog-current)
|
||||
("H" "HEAD" magit-reflog-head)
|
||||
("O" "other" magit-reflog-other)]
|
||||
[:if (lambda ()
|
||||
(require 'magit-wip)
|
||||
(magit--any-wip-mode-enabled-p))
|
||||
@@ -634,6 +637,41 @@ one or more revs read from the minibuffer."
|
||||
(magit-log-arguments)))
|
||||
(magit-log-setup-buffer revs args files))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-log-head (&optional args files)
|
||||
"Show log for `HEAD'."
|
||||
(interactive (magit-log-arguments))
|
||||
(magit-log-setup-buffer (list "HEAD") args files))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-log-related (revs &optional args files)
|
||||
"Show log for the current branch, its upstream and its push target.
|
||||
When the upstream is a local branch, then also show its own
|
||||
upstream. When `HEAD' is detached, then show log for that, the
|
||||
previously checked out branch and its upstream and push-target."
|
||||
(interactive
|
||||
(cons (let ((current (magit-get-current-branch))
|
||||
head rebase target upstream upup)
|
||||
(unless current
|
||||
(setq rebase (magit-rebase--get-state-lines "head-name"))
|
||||
(cond (rebase
|
||||
(setq rebase (magit-ref-abbrev rebase))
|
||||
(setq current rebase)
|
||||
(setq head "HEAD"))
|
||||
(t (setq current (magit-get-previous-branch)))))
|
||||
(cond (current
|
||||
(setq current
|
||||
(magit--propertize-face current'magit-branch-local))
|
||||
(setq target (magit-get-push-branch current t))
|
||||
(setq upstream (magit-get-upstream-branch current))
|
||||
(when upstream
|
||||
(setq upup (and (magit-local-branch-p upstream)
|
||||
(magit-get-upstream-branch upstream)))))
|
||||
(t (setq head "HEAD")))
|
||||
(delq nil (list current head target upstream upup)))
|
||||
(magit-log-arguments)))
|
||||
(magit-log-setup-buffer revs args files))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-log-other (revs &optional args files)
|
||||
"Show log for one or more revs read from the minibuffer.
|
||||
@@ -645,12 +683,6 @@ completion candidates."
|
||||
(magit-log-arguments)))
|
||||
(magit-log-setup-buffer revs args files))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-log-head (&optional args files)
|
||||
"Show log for `HEAD'."
|
||||
(interactive (magit-log-arguments))
|
||||
(magit-log-setup-buffer (list "HEAD") args files))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-log-branches (&optional args files)
|
||||
"Show log for all local branches and `HEAD'."
|
||||
|
||||
Reference in New Issue
Block a user