Wazzup section fixes.

* magit.el (magit-refresh-wazzup-buffer): Use the branch name as the
title and a type of 'wazzup'.
This commit is contained in:
Marius Vollmer 2009-01-25 01:04:51 +02:00
parent 8f9fb43590
commit 6c8a668d24

View file

@ -2312,15 +2312,20 @@ Prefix arg means justify as well."
(insert (format "Wazzup, %s\n\n" head)) (insert (format "Wazzup, %s\n\n" head))
(let ((branches (magit-shell-lines "git branch -a | cut -c3-"))) (let ((branches (magit-shell-lines "git branch -a | cut -c3-")))
(dolist (b branches) (dolist (b branches)
(let ((section (let* ((n (magit-shell "git log --pretty=oneline %s..%s | wc -l"
(magit-insert-section 'wazzup head b))
(format "Unmerged commits in %s" b) (section
'magit-wash-log (let ((magit-section-hidden-default t))
"git" "log" (magit-insert-section
"--max-count=100" (cons b 'wazzup)
"--pretty=oneline" (format "%s unmerged commits in %s"
(format "%s..%s" head b) n b)
"--"))) 'magit-wash-log
"git" "log"
"--max-count=100"
"--pretty=oneline"
(format "%s..%s" head b)
"--"))))
(magit-set-section-info b section))))))) (magit-set-section-info b section)))))))
(defun magit-wazzup () (defun magit-wazzup ()
@ -2343,7 +2348,9 @@ Prefix arg means justify as well."
(interactive) (interactive)
(magit-section-action (item info "ignore") (magit-section-action (item info "ignore")
((untracked file) ((untracked file)
(magit-ignore-file info current-prefix-arg nil)))) (magit-ignore-file info current-prefix-arg nil))
((wazzup)
(message "wazzup"))))
(defun magit-ignore-item-locally () (defun magit-ignore-item-locally ()
(interactive) (interactive)