If wazzup head is detached then describe it so.

This commit is contained in:
Phil Jackson 2010-03-29 21:21:09 +01:00
parent c51582ee17
commit 33ea60d690

View file

@ -3320,10 +3320,11 @@ Prefix arg means justify as well."
(magit-need-refresh)))) (magit-need-refresh))))
(defun magit-refresh-wazzup-buffer (head all) (defun magit-refresh-wazzup-buffer (head all)
(let ((branch-desc (or head "(detached) HEAD")))
(unless head (setq head "HEAD")) (unless head (setq head "HEAD"))
(magit-create-buffer-sections (magit-create-buffer-sections
(magit-with-section 'wazzupbuf nil (magit-with-section 'wazzupbuf nil
(insert (format "Wazzup, %s\n\n" head)) (insert (format "Wazzup, %s\n\n" branch-desc))
(let* ((excluded (magit-file-lines ".git/info/wazzup-exclude")) (let* ((excluded (magit-file-lines ".git/info/wazzup-exclude"))
(all-branches (magit-list-interesting-refs)) (all-branches (magit-list-interesting-refs))
(branches (if all all-branches (branches (if all all-branches
@ -3358,7 +3359,7 @@ Prefix arg means justify as well."
"--pretty=oneline" "--pretty=oneline"
(format "%s..%s" head ref) (format "%s..%s" head ref)
"--")))) "--"))))
(magit-set-section-info ref section))))))))) (magit-set-section-info ref section))))))))))
(defun magit-wazzup (&optional all) (defun magit-wazzup (&optional all)
(interactive "P") (interactive "P")