{"thread":{"id":"3554","subject":"[PATCH 4/5] git.el: Added support for Signed-off-by.","startedAt":"2006-03-04T16:38:41Z","lastAt":"2009-05-09T19:57:31Z","messageCount":3,"participants":["Alexandre Julliard","David Woodhouse"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"17149","messageId":"877j7akvvy.fsf@wine.dyndns.org","threadId":"3554","inReplyTo":null,"subject":"[PATCH 4/5] git.el: Added support for Signed-off-by.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2006-03-04T16:38:41Z","receivedAt":"2006-03-04T16:38:41Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"If `git-append-signed-off-by' is non-nil, automatically append a\nsign-off line to the log message when editing it.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n\n---\n\n contrib/emacs/git.el |   16 +++++++++++-----\n 1 files changed, 11 insertions(+), 5 deletions(-)\n\n00728d51cbda0f21be59cc56b23f4943c6657a63\ndiff --git a/contrib/emacs/git.el b/contrib/emacs/git.el\nindex 335dcb2..0b24b4d 100644\n--- a/contrib/emacs/git.el\n+++ b/contrib/emacs/git.el\n@@ -39,7 +39,6 @@\n ;;  - hook into file save (after-save-hook)\n ;;  - diff against other branch\n ;;  - renaming files from the status buffer\n-;;  - support for appending signed-off-by\n ;;  - creating tags\n ;;  - fetch/pull\n ;;  - switching branches\n@@ -103,6 +102,9 @@ If not set, fall back to `add-log-mailin\n (defvar git-commits-coding-system 'utf-8\n   \"Default coding system for git commits.\")\n \n+(defvar git-append-signed-off-by nil\n+  \"Whether to append a Signed-off-by line to the commit message.\")\n+\n (defconst git-log-msg-separator \"--- log message follows this line ---\")\n \n (defconst git-per-dir-ignore-file \".gitignore\"\n@@ -792,7 +794,8 @@ If not set, fall back to `add-log-mailin\n   (unless git-status (error \"Not in git-status buffer.\"))\n   (let ((buffer (get-buffer-create \"*git-commit*\"))\n         (merge-heads (git-get-merge-heads))\n-        (dir default-directory))\n+        (dir default-directory)\n+        (sign-off git-append-signed-off-by))\n     (with-current-buffer buffer\n       (when (eq 0 (buffer-size))\n         (cd dir)\n@@ -809,10 +812,13 @@ If not set, fall back to `add-log-mailin\n           'face 'git-header-face)\n          (propertize git-log-msg-separator 'face 'git-separator-face)\n          \"\\n\")\n-        (when (and merge-heads (file-readable-p \".git/MERGE_MSG\"))\n-          (insert-file-contents \".git/MERGE_MSG\"))))\n+        (cond ((and merge-heads (file-readable-p \".git/MERGE_MSG\"))\n+               (insert-file-contents \".git/MERGE_MSG\"))\n+              (sign-off\n+               (insert (format \"\\n\\nSigned-off-by: %s <%s>\\n\"\n+                               (git-get-committer-name) (git-get-committer-email)))))))\n     (let ((log-edit-font-lock-keywords\n-           `((\"^\\\\(Author:\\\\|Date:\\\\|Parent:\\\\)\\\\(.*\\\\)\"\n+           `((\"^\\\\(Author:\\\\|Date:\\\\|Parent:\\\\|Signed-off-by:\\\\)\\\\(.*\\\\)\"\n               (1 font-lock-keyword-face)\n               (2 font-lock-function-name-face))\n              (,(concat \"^\\\\(\" (regexp-quote git-log-msg-separator) \"\\\\)$\")\n-- \n1.2.4.g0040-dirty\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"},{"id":"113398","messageId":"1241879110.2910.89.camel@macbook.infradead.org","threadId":"3554","inReplyTo":"877j7akvvy.fsf@wine.dyndns.org","subject":"Re: [PATCH 4/5] git.el: Added support for Signed-off-by.","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2009-05-09T14:25:10Z","receivedAt":"2009-05-09T14:25:10Z","isPatch":true,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Sat, 2006-03-04 at 17:38 +0100, Alexandre Julliard wrote:\n> If `git-append-signed-off-by' is non-nil, automatically append a\n> sign-off line to the log message when editing it.\n\nThis doesn't seem to work when I hit C-v v to commit. I just get an\nempty *VC-log* buffer.\n\n-- \nDavid Woodhouse                            Open Source Technology Centre\nDavid.Woodhouse@intel.com                              Intel Corporation\n"},{"id":"113421","messageId":"87r5yycams.fsf@wine.dyndns.org","threadId":"3554","inReplyTo":"1241879110.2910.89.camel@macbook.infradead.org","subject":"Re: [PATCH 4/5] git.el: Added support for Signed-off-by.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2009-05-09T19:57:31Z","receivedAt":"2009-05-09T19:57:31Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"David Woodhouse <dwmw2@infradead.org> writes:\n\n> On Sat, 2006-03-04 at 17:38 +0100, Alexandre Julliard wrote:\n>> If `git-append-signed-off-by' is non-nil, automatically append a\n>> sign-off line to the log message when editing it.\n>\n> This doesn't seem to work when I hit C-v v to commit. I just get an\n> empty *VC-log* buffer.\n\nC-v v doesn't use git.el, it uses the standard Emacs VC mode with the\nvc-git backend. I don't think there's a clean way currently for a VC\nbackend to populate the log buffer, so if you want the auto sign off you\nhave to do the commit from the git-status buffer.\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"}]}