Skip to content

Commit

Permalink
magit-insert-status-{local,remote}-line: use `branch' as section type
Browse files Browse the repository at this point in the history
Adjust `magit-copy-item-as-kill' accordingly.
  • Loading branch information
tarsius committed Mar 28, 2014
1 parent a9dd792 commit d905777
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -4472,7 +4472,7 @@ can be used to override this."

(defun magit-insert-status-local-line ()
(let ((branch (or (magit-get-current-branch) "(detached)")))
(magit-insert-line-section (line branch)
(magit-insert-line-section (branch branch)
(concat "Local: "
(propertize branch 'face 'magit-branch)
" " (abbreviate-file-name default-directory)))))
Expand All @@ -4481,7 +4481,7 @@ can be used to override this."
(let* ((branch (magit-get-current-branch))
(tracked (magit-get-tracked-branch branch)))
(when tracked
(magit-insert-line-section (line tracked)
(magit-insert-line-section (branch tracked)
(concat "Remote: "
(and (magit-get-boolean "branch" branch "rebase") "onto ")
(magit-format-tracked-line tracked branch))))))
Expand Down Expand Up @@ -7413,9 +7413,8 @@ Non-interactively DIRECTORY is always (re-)initialized."
"Copy sha1 of commit at point into kill ring."
(interactive)
(magit-section-action copy (info)
(line (when info
(kill-new info)
(message "%s" info)))
(branch (kill-new info)
(message "%s" info))
(diff (kill-new info)
(message "%s" info))
(file (kill-new info)
Expand Down

0 comments on commit d905777

Please sign in to comment.