{"thread":{"id":"12907","subject":"[PATCH/RFC] git.el: Add a git-log command","startedAt":"2008-03-28T16:53:26Z","lastAt":"2008-03-28T16:53:26Z","messageCount":1,"participants":["Rémi Vanicat"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73282","messageId":"87bq4ydc3d.dlv@maison.homelinux.org","threadId":"12907","inReplyTo":null,"subject":"[PATCH/RFC] git.el: Add a git-log command","fromName":"Rémi Vanicat","fromEmail":"vanicat@debian.org","sentAt":"2008-03-28T16:53:26Z","receivedAt":"2008-03-28T16:53:26Z","isPatch":true,"sender":{"key":"vanicat@debian.org","avatar":"https://gravatar.com/avatar/cd491a7f4c221349809a60f88fc21326b97cce2a705e318898aa74851db92409?d=mp&s=160"},"body":"The git-log-files command only give log relative to selected files, or\nrelative to the file under cursor if there is no selected files, so\ngit.el could not give the full log.  This new command do it.\n\nThere is no key-binding for now.\n---\nDo I need a key binding for this? No idea where to put it. \nAnother way to do it may be to use a prefix arg to git-log-file\n\n contrib/emacs/git.el |   16 +++++++++++-----\n 1 files changed, 11 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/emacs/git.el b/contrib/emacs/git.el\nindex 4fa853f..6cf55dc 100644\n--- a/contrib/emacs/git.el\n+++ b/contrib/emacs/git.el\n@@ -1191,11 +1191,10 @@ Return the list of files that haven't been handled.\"\n            (buff2 (git-run-command-buffer (concat filename \".~HEAD~\") \"cat-file\" \"blob\" (concat \"HEAD:\" filename))))\n       (ediff-buffers buff1 buff2))))\n \n-(defun git-log-file ()\n+(defun git-log-file (files)\n   \"Display a log of changes to the marked file(s).\"\n-  (interactive)\n-  (let* ((files (git-marked-files))\n-         (coding-system-for-read git-commits-coding-system)\n+  (interactive (list (git-marked-files)))\n+  (let* ((coding-system-for-read git-commits-coding-system)\n          (buffer (apply #'git-run-command-buffer \"*git-log*\" \"rev-list\" \"--pretty\" \"HEAD\" \"--\" (git-get-filenames files))))\n     (with-current-buffer buffer\n       ; (git-log-mode)  FIXME: implement log mode\n@@ -1203,6 +1202,11 @@ Return the list of files that haven't been handled.\"\n       (setq buffer-read-only t))\n     (display-buffer buffer)))\n \n+(defun git-log ()\n+  \"Display a log of changes.\"\n+  (interactive)\n+  (git-log-file ()))\n+\n (defun git-log-edit-files ()\n   \"Return a list of marked files for use in the log-edit buffer.\"\n   (with-current-buffer log-edit-parent-buffer\n@@ -1495,7 +1499,9 @@ amended version of it.\"\n       [\"View File\" git-view-file t]\n       [\"Diff File\" git-diff-file t]\n       [\"Interactive Diff File\" git-diff-file-idiff t]\n-      [\"Log\" git-log-file t]\n+      [\"Log file\" git-log-file t]\n+      [\"Log\" git-log t]\n+      ,@(if (featurep 'grep) (list [\"Grep\" git-grep t]) ())\n       \"--------\"\n       [\"Mark\" git-mark-file t]\n       [\"Mark All\" git-mark-all t]\n-- \n1.5.5.rc0.19.g4b856\n"}]}