summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ddf6d7)
raw | patch | inline | side by side (parent: 9ddf6d7)
author | Alexandre Julliard <julliard@winehq.org> | |
Sat, 2 Aug 2008 16:04:31 +0000 (18:04 +0200) | ||
committer | Alexandre Julliard <julliard@winehq.org> | |
Fri, 21 Nov 2008 19:39:02 +0000 (20:39 +0100) |
Use a single Merge: header instead of one Parent: header for each
parent, and don't list the current HEAD as a merged head. Support
symbolic references too.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
parent, and don't list the current HEAD as a merged head. Support
symbolic references too.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
contrib/emacs/git.el | patch | blob | history |
diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el
index d28b45e5583152ba39942f4243fdc0d83bdafd69..53ada39b430c0248b4908081356db5fb282bd43c 100644 (file)
--- a/contrib/emacs/git.el
+++ b/contrib/emacs/git.el
(defconst git-log-msg-separator "--- log message follows this line ---")
(defvar git-log-edit-font-lock-keywords
- `(("^\\(Author:\\|Date:\\|Parent:\\|Signed-off-by:\\)\\(.*\\)$"
+ `(("^\\(Author:\\|Date:\\|Merge:\\|Signed-off-by:\\)\\(.*\\)$"
(1 font-lock-keyword-face)
(2 font-lock-function-name-face))
(,(concat "^\\(" (regexp-quote git-log-msg-separator) "\\)$")
(when (re-search-forward "^Date: +\\(.*\\)$" nil t)
(setq author-date (match-string 1)))
(goto-char (point-min))
- (while (re-search-forward "^Parent: +\\([0-9a-f]+\\)" nil t)
- (unless (string-equal head (match-string 1))
- (setq subject "commit (merge): ")
+ (when (re-search-forward "^Merge: +\\(.*\\)" nil t)
+ (setq subject "commit (merge): ")
+ (dolist (parent (split-string (match-string 1) " +" t))
(push "-p" args)
- (push (match-string 1) args))))
+ (push parent args))))
(setq log-start (point-min)))
(setq log-end (point-max))
(goto-char log-start)
(or author-email committer-email)
(if date (format "Date: %s\n" date) "")
(if merge-heads
- (format "Parent: %s\n%s\n"
- (git-rev-parse "HEAD")
- (mapconcat (lambda (str) (concat "Parent: " str)) merge-heads "\n"))
+ (format "Merge: %s\n"
+ (mapconcat 'identity merge-heads " "))
""))
'face 'git-header-face)
(propertize git-log-msg-separator 'face 'git-separator-face)