@matheusbsbs / matheus-bagliano / commits / 24a2293ad3
Fork 0

git-blame.el: show the when, who and what in the minibuffer.

Change the default operation to show 'when (day the commit was made), who (who made the commit), what (what the commit log was)' in the minibuffer instead of SHA1 and title of the commit log. Since the user may prefer other displaying options, it is made as a user-configurable option. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junichi Uekawa committed Feb 12, 2008 at 00:00 UTC 24a2293ad35d567530048f0d2b0d11e0012af26d
1 file changed +9 -1
contrib/emacs/git-blame.el
+9 -1
@@ -105,6 +105,13 @@ selected element from l."
105 (setq ,l (remove e ,l))
106 e))
107
108 +(defvar git-blame-log-oneline-format
109 + "format:[%cr] %cn: %s"
110 + "*Formatting option used for describing current line in the minibuffer.
111 +
112 +This option is used to pass to git log --pretty= command-line option,
113 +and describe which commit the current line was made.")
114 +
115 (defvar git-blame-dark-colors
116 (git-blame-color-scale "0c" "04" "24" "1c" "2c" "34" "14" "3c")
117 "*List of colors (format #RGB) to use in a dark environment.
@@ -371,7 +378,8 @@ See also function `git-blame-mode'."
378 (defun git-describe-commit (hash)
379 (with-temp-buffer
380 (call-process "git" nil t nil
374 - "log" "-1" "--pretty=oneline"
381 + "log" "-1"
382 + (concat "--pretty=" git-blame-log-oneline-format)
383 hash)
384 (buffer-substring (point-min) (1- (point-max)))))
385