On Monday 25 May 2009 22:16:31 Ethan wrote:
> On Sun, May 24, 2009 at 2:54 PM, henrik <[email protected]> wrote:
> > I'd like to add the Signed-off-by line. Atm I've added a shortcut that
> > adds this (in any buffer, and any mode), but it would be great to have
> > a way of setting that as default, so when I press 'c', the signed-off-
> > by line is added, with the values from .gitconfig.
>
> I did see this commit on gitorious:
>
> http://gitorious.org/~fdr/magit/fdr-magit/commit/68344a20a0f10fe7539a39a733
>4c0feaf213e9ef
>
> This just adds a --signoff argument to git-commit, rather than dumping a
> Signed-off-by header to the commit buffer, but it might be better than
> nothing.

It was. :-)

I still would like to add a feature reqest to do this while commiting (as some 
commits are better off unsigned).

Anyway, to put this into a semidocumented state (in case any others out there 
have the same issue):

In magit/magit.el, change the following

(defcustom magit-commit-signoff nil
  "When performing git commit adds --signoff"
  :group 'magit
  :type 'boolean)

to

(defcustom magit-commit-signoff t
  "When performing git commit adds --signoff"
  :group 'magit
  :type 'boolean)

(set the option to true)

Now, even though the commit-buffer is empty, when you commit, a Signed-off-by 
is added. Fantastic :-)

> Ethan

Thanks!

-- 
Med Vennlig Hilsen - Yours Sincerely
Henrik Austad

Reply via email to