summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2008-02-11 15:00:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:23:15 (GMT)
commit24a2293ad35d567530048f0d2b0d11e0012af26d (patch)
treefa962d70d8229538a7f46e35af96ba8a7571d4af
parent14f9e128d38f809947d34979a59ee524e350ac6e (diff)
downloadgit-24a2293ad35d567530048f0d2b0d11e0012af26d.zip
git-24a2293ad35d567530048f0d2b0d11e0012af26d.tar.gz
git-24a2293ad35d567530048f0d2b0d11e0012af26d.tar.bz2
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>
-rw-r--r--contrib/emacs/git-blame.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
index bb671d5..9f92cd2 100644
--- a/contrib/emacs/git-blame.el
+++ b/contrib/emacs/git-blame.el
@@ -105,6 +105,13 @@ selected element from l."
(setq ,l (remove e ,l))
e))
+(defvar git-blame-log-oneline-format
+ "format:[%cr] %cn: %s"
+ "*Formatting option used for describing current line in the minibuffer.
+
+This option is used to pass to git log --pretty= command-line option,
+and describe which commit the current line was made.")
+
(defvar git-blame-dark-colors
(git-blame-color-scale "0c" "04" "24" "1c" "2c" "34" "14" "3c")
"*List of colors (format #RGB) to use in a dark environment.
@@ -371,7 +378,8 @@ See also function `git-blame-mode'."
(defun git-describe-commit (hash)
(with-temp-buffer
(call-process "git" nil t nil
- "log" "-1" "--pretty=oneline"
+ "log" "-1"
+ (concat "--pretty=" git-blame-log-oneline-format)
hash)
(buffer-substring (point-min) (1- (point-max)))))