From 6f9993cbd4da6a523cf1e81c4708be5c1d27854f Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Sat, 6 Feb 2010 15:40:14 +0000 Subject: [PATCH] Remove 'HEAD' from ref list. --- magit.el | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/magit.el b/magit.el index f09dacd4..4a2e2e65 100644 --- a/magit.el +++ b/magit.el @@ -1896,7 +1896,7 @@ Please see the manual for a complete description of Magit. "^\\([_\\*|/ ]+\\)" ; graph (1) "\\(?:" "\\([0-9a-fA-F]\\{40\\}\\) " ; sha1 (2) - "\\(?:\\((.+?)\\) \\)?" ; refs (3) + "\\(?:\\((.+?)\\) \\)?" ; refs (3) "\\(.*\\)" ; msg (4) "\\)?$") "Regexp used to extract elements of git log output with @@ -1944,20 +1944,21 @@ string which will represent the log line.") (cond ((looking-at magit-log-oneline-re) (let ((chart (match-string 1)) - (sha1 (match-string 2)) - (msg (match-string 4)) - (refs (when (match-string 3) - (remove-if (lambda (s) - (string= s "tag:")) - (split-string (match-string 3) "[(), ]" t))))) - (delete-region (point-at-bol) (point-at-eol)) - (insert (funcall magit-present-log-line-function chart sha1 refs msg)) - (goto-char (point-at-bol)) - (if sha1 - (magit-with-section sha1 'commit - (magit-set-section-info sha1) - (forward-line)) - (forward-line)))) + (sha1 (match-string 2)) + (msg (match-string 4)) + (refs (when (match-string 3) + (remove-if (lambda (s) + (or (string= s "tag:") + (string= s "HEAD"))) ; as of 1.6.6 + (split-string (match-string 3) "[(), ]" t))))) + (delete-region (point-at-bol) (point-at-eol)) + (insert (funcall magit-present-log-line-function chart sha1 refs msg)) + (goto-char (point-at-bol)) + (if sha1 + (magit-with-section sha1 'commit + (magit-set-section-info sha1) + (forward-line)) + (forward-line)))) (t (forward-line))) t))