Remove 'HEAD' from ref list.

This commit is contained in:
Phil Jackson 2010-02-06 15:40:14 +00:00
parent a4cbd5ecd3
commit 6f9993cbd4

View file

@ -1896,7 +1896,7 @@ Please see the manual for a complete description of Magit.
"^\\([_\\*|/ ]+\\)" ; graph (1) "^\\([_\\*|/ ]+\\)" ; graph (1)
"\\(?:" "\\(?:"
"\\([0-9a-fA-F]\\{40\\}\\) " ; sha1 (2) "\\([0-9a-fA-F]\\{40\\}\\) " ; sha1 (2)
"\\(?:\\((.+?)\\) \\)?" ; refs (3) "\\(?:\\((.+?)\\) \\)?" ; refs (3)
"\\(.*\\)" ; msg (4) "\\(.*\\)" ; msg (4)
"\\)?$") "\\)?$")
"Regexp used to extract elements of git log output with "Regexp used to extract elements of git log output with
@ -1944,20 +1944,21 @@ string which will represent the log line.")
(cond (cond
((looking-at magit-log-oneline-re) ((looking-at magit-log-oneline-re)
(let ((chart (match-string 1)) (let ((chart (match-string 1))
(sha1 (match-string 2)) (sha1 (match-string 2))
(msg (match-string 4)) (msg (match-string 4))
(refs (when (match-string 3) (refs (when (match-string 3)
(remove-if (lambda (s) (remove-if (lambda (s)
(string= s "tag:")) (or (string= s "tag:")
(split-string (match-string 3) "[(), ]" t))))) (string= s "HEAD"))) ; as of 1.6.6
(delete-region (point-at-bol) (point-at-eol)) (split-string (match-string 3) "[(), ]" t)))))
(insert (funcall magit-present-log-line-function chart sha1 refs msg)) (delete-region (point-at-bol) (point-at-eol))
(goto-char (point-at-bol)) (insert (funcall magit-present-log-line-function chart sha1 refs msg))
(if sha1 (goto-char (point-at-bol))
(magit-with-section sha1 'commit (if sha1
(magit-set-section-info sha1) (magit-with-section sha1 'commit
(forward-line)) (magit-set-section-info sha1)
(forward-line)))) (forward-line))
(forward-line))))
(t (t
(forward-line))) (forward-line)))
t)) t))