Skip to content

Commit

Permalink
Merge branch 'improve--magit-copy-item-as-kill'
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Mar 28, 2014
2 parents ef0311d + f86cb4f commit 78f3bb5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions magit.el
Expand Up @@ -4471,17 +4471,17 @@ can be used to override this."
(insert "\n"))

(defun magit-insert-status-local-line ()
(magit-insert-line-section (line)
(concat "Local: "
(propertize (or (magit-get-current-branch) "(detached)")
'face 'magit-branch)
" " (abbreviate-file-name default-directory))))
(let ((branch (or (magit-get-current-branch) "(detached)")))
(magit-insert-line-section (branch branch)
(concat "Local: "
(propertize branch 'face 'magit-branch)
" " (abbreviate-file-name default-directory)))))

(defun magit-insert-status-remote-line ()
(let* ((branch (magit-get-current-branch))
(tracked (magit-get-tracked-branch branch)))
(when tracked
(magit-insert-line-section (line)
(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,8 +7413,9 @@ Non-interactively DIRECTORY is always (re-)initialized."
"Copy sha1 of commit at point into kill ring."
(interactive)
(magit-section-action copy (info)
(commit (kill-new info)
(message "%s" info))))
((branch commit file diff)
(kill-new info)
(message "%s" info))))

(defun magit-ignore-item (edit &optional local)
"Ignore the item at point.
Expand Down

0 comments on commit 78f3bb5

Please sign in to comment.