{"thread":{"id":"20495","subject":"[PATCH] git-blame.el: Add `git-blame-show-full-message'","startedAt":"2009-08-09T14:27:36Z","lastAt":"2009-08-09T14:27:36Z","messageCount":1,"participants":["Martin Nordholts"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"120054","messageId":"1249828056.11623.5.camel@localhost.localdomain","threadId":"20495","inReplyTo":null,"subject":"[PATCH] git-blame.el: Add `git-blame-show-full-message'","fromName":"Martin Nordholts","fromEmail":"enselic@gmail.com","sentAt":"2009-08-09T14:27:36Z","receivedAt":"2009-08-09T14:27:36Z","isPatch":true,"sender":{"key":"enselic@gmail.com","avatar":"https://gravatar.com/avatar/74df556deac89f8da8c185cdbf811d51d7205eb48770305e84d7c1435755510e?d=mp&s=160"},"body":"Add an interactively callable function `git-blame-show-full-message'\nthat shows the full commit message with --pretty=full in the echo\narea.\n\nThe purpose of the function is to allow a user of git-blame.el to\nbrowse around in a file until an interesting commit oneliner is shown,\nat which point the user can invoke `git-blame-show-full-message' to\nget more verbose information.\n\nSigned-off-by: Martin Nordholts <martinn@src.gnome.org>\n---\n contrib/emacs/git-blame.el |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el\nindex 4fa70c5..443ebce 100644\n--- a/contrib/emacs/git-blame.el\n+++ b/contrib/emacs/git-blame.el\n@@ -40,7 +40,8 @@\n ;; turn it on while viewing a file, the editor buffer will be updated by\n ;; setting the background of individual lines to a color that reflects\n ;; which commit it comes from.  And when you move around the buffer, a\n-;; one-line summary will be shown in the echo area.\n+;; one-line summary will be shown in the echo area.  To get the complete\n+;; commit message, invoke `git-blame-show-full-message'.\n \n ;;; Installation:\n ;;\n@@ -340,7 +341,7 @@ See also function `git-blame-mode'.\"\n \t\t\t (git-blame-random-pop git-blame-colors)\n \t\t       git-blame-ancient-color)))\n           (setq info (list hash src-line res-line num-lines\n-                           (git-describe-commit hash)\n+                           (git-describe-commit hash git-blame-log-oneline-format)\n                            (cons 'color color))))\n         (puthash hash info git-blame-cache))\n       (goto-line res-line)\n@@ -375,11 +376,11 @@ See also function `git-blame-mode'.\"\n         (car info)\n       (error \"No commit info\"))))\n \n-(defun git-describe-commit (hash)\n+(defun git-describe-commit (hash pretty-format)\n   (with-temp-buffer\n     (call-process \"git\" nil t nil\n                   \"log\" \"-1\"\n-\t\t  (concat \"--pretty=\" git-blame-log-oneline-format)\n+\t\t  (concat \"--pretty=\" pretty-format)\n                   hash)\n     (buffer-substring (point-min) (point-max))))\n \n@@ -392,6 +393,11 @@ See also function `git-blame-mode'.\"\n       (message \"%s\" (nth 4 info))\n       (setq git-blame-last-identification info))))\n \n+(defun git-blame-show-full-message  ()\n+  \"Show full log message about current commit\"\n+  (interactive)\n+  (message (git-describe-commit (git-blame-current-commit) \"full\")))\n+\n ;; (defun git-blame-after-save ()\n ;;   (when git-blame-mode\n ;;     (git-blame-cleanup)\n-- \n1.6.2.5\n"}]}