Fix `magit-refresh-status'.
This commit is contained in:
parent
67af1eead8
commit
f569ff8359
1 changed files with 7 additions and 10 deletions
17
magit.el
17
magit.el
|
@ -2567,18 +2567,17 @@ insert a line to tell how to insert more of them"
|
||||||
(let* ((branch (magit-get-current-branch))
|
(let* ((branch (magit-get-current-branch))
|
||||||
(remote (and branch (magit-get "branch" branch "remote")))
|
(remote (and branch (magit-get "branch" branch "remote")))
|
||||||
(remote-branch (or (and branch (magit-remote-branch-for branch)) branch))
|
(remote-branch (or (and branch (magit-remote-branch-for branch)) branch))
|
||||||
(svn-info (magit-get-svn-ref-info))
|
(remote-string (magit-remote-string remote remote-branch))
|
||||||
(remote-string (magit-remote-string remote remote-branch svn-info))
|
|
||||||
(head (magit-git-string
|
(head (magit-git-string
|
||||||
"log" "--max-count=1" "--abbrev-commit" "--pretty=oneline"))
|
"log" "--max-count=1" "--abbrev-commit" "--pretty=oneline"))
|
||||||
(no-commit (not head)))
|
(no-commit (not head)))
|
||||||
(when remote-string
|
(when remote-string
|
||||||
(insert "Remote: " remote-string "\n"))
|
(insert "Remote: " remote-string "\n"))
|
||||||
(insert (format "Local: %s %s\n"
|
(insert (format "Local: %s %s\n"
|
||||||
(propertize (or branch "(detached)")
|
(propertize (or branch "(detached)")
|
||||||
'face 'magit-branch)
|
'face 'magit-branch)
|
||||||
(abbreviate-file-name default-directory)))
|
(abbreviate-file-name default-directory)))
|
||||||
(insert (format "Head: %s\n"
|
(insert (format "Head: %s\n"
|
||||||
(if no-commit "nothing commited (yet)" head)))
|
(if no-commit "nothing commited (yet)" head)))
|
||||||
(let ((merge-heads (magit-file-lines ".git/MERGE_HEAD")))
|
(let ((merge-heads (magit-file-lines ".git/MERGE_HEAD")))
|
||||||
(if merge-heads
|
(if merge-heads
|
||||||
|
@ -2593,17 +2592,15 @@ insert a line to tell how to insert more of them"
|
||||||
(magit-git-exit-code "update-index" "--refresh")
|
(magit-git-exit-code "update-index" "--refresh")
|
||||||
(magit-insert-untracked-files)
|
(magit-insert-untracked-files)
|
||||||
(magit-insert-stashes)
|
(magit-insert-stashes)
|
||||||
|
(magit-insert-topics)
|
||||||
(magit-insert-pending-changes)
|
(magit-insert-pending-changes)
|
||||||
(magit-insert-pending-commits)
|
(magit-insert-pending-commits)
|
||||||
(when remote
|
(magit-insert-unpulled-commits remote remote-branch)
|
||||||
(magit-insert-unpulled-commits remote remote-branch))
|
|
||||||
(let ((staged (or no-commit (magit-anything-staged-p))))
|
(let ((staged (or no-commit (magit-anything-staged-p))))
|
||||||
(magit-insert-unstaged-changes
|
(magit-insert-unstaged-changes
|
||||||
(if staged "Unstaged changes:" "Changes:"))
|
(if staged "Unstaged changes:" "Changes:"))
|
||||||
(if staged
|
(magit-insert-staged-changes staged no-commit))
|
||||||
(magit-insert-staged-changes staged no-commit)))
|
(magit-insert-unpushed-commits remote branch)
|
||||||
(when remote
|
|
||||||
(magit-insert-unpushed-commits remote remote-branch))
|
|
||||||
(run-hooks 'magit-refresh-status-hook)))))
|
(run-hooks 'magit-refresh-status-hook)))))
|
||||||
|
|
||||||
(defun magit-init (dir)
|
(defun magit-init (dir)
|
||||||
|
|
Loading…
Reference in a new issue