From: Junichi Uekawa Subject: [PATCH] git-blame.el: show the when, who and what in the minibuffer. Date: Tue, 12 Feb 2008 00:00:07 +0900 Message-ID: <87ve4vo7g4.dancerj%dancer@netfort.gr.jp> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Xavier Maillard , David =?ISO-8859-1?Q?K=E5gedal?= To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Feb 11 16:12:41 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOaIu-0001oR-2D for gcvg-git-2@gmane.org; Mon, 11 Feb 2008 16:10:44 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753500AbYBKPKH (ORCPT ); Mon, 11 Feb 2008 10:10:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753355AbYBKPKH (ORCPT ); Mon, 11 Feb 2008 10:10:07 -0500 Received: from aegis.netfort.gr.jp ([219.94.144.215]:33917 "HELO aegis.netfort.gr.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753148AbYBKPKF (ORCPT ); Mon, 11 Feb 2008 10:10:05 -0500 Received: (qmail 6467 invoked by uid 0); 11 Feb 2008 15:10:04 -0000 Received: from unknown (HELO dancer64.netfort.gr.jp.netfort.gr.jp) (127.0.0.1) by aegis.netfort.gr.jp with SMTP; 11 Feb 2008 15:10:04 -0000 User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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. --- contrib/emacs/git-blame.el | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el index bb671d5..99e2b6f 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))))) -- 1.5.3.8