git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-blame.el: show the when, who and what in the minibuffer.

From
David Kågedal <davidk@lysator.liu.se>
Date
Feb 11, 2008, 15:20 UTC
Message-ID
<87ve4vr03u.fsf@lysator.liu.se>
In-Reply-To
<87ve4vo7g4.dancerj%dancer@netfort.gr.jp>
Junichi Uekawa <dancer@netfort.gr.jp> writes:
Show 6 quoted lines
> 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.
Good idea.
Show 31 quoted lines
> ---
>  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)))))
-- 
David Kågedal
Previous: Junichi UekawaNext: Xavier Maillard
Message 2 of 3 in “git-blame.el: show the when, who and what in the minibuffer.”
  1. git-blame.el: show the when, who and what in the minibuffer.Junichi Uekawa, Feb 11, 2008
  2. David KågedalFeb 11, 2008
  3. Xavier MaillardFeb 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.