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

Re: Request for git merge --signoff

From
Christian Couder <christian.couder@gmail.com>
Date
Jul 25, 2017, 05:42 UTC
Message-ID
<CAP8UFD0KoamG88x-vWXPWT-pv8=f-v+fxOKH1=B9NrZrZhTm=g@mail.gmail.com>
In-Reply-To
<CAHv71zK5SqbwrBFX=a8-DY9H3KT4FEyMgv__p2gZzNr0WUAPUw@mail.gmail.com>
On Sat, Jul 1, 2017 at 5:24 PM, Dan Kohn <dan@linuxfoundation.org> wrote:
Show 5 quoted lines
> https://github.com/coreinfrastructure/best-practices-badge is a user
> of the https://github.com/probot/dco bot which checks that commits
> have a signoff. The issue is that there is no `--signoff` option in
> git for merge commits, which is a standard part of our workflow with
> feature branches. Here is a workflow where we currently get stuck:
[...]
> Or, I could manually add the Signoff line to the proposed git merge
> commit message, which would allow me to skip the `--amend` step.

Perhaps you could use a prepare-commit-msg hook (or maybe a commit-msg hook) to automatically add your Signoff line to any commit message if it isn't there already.

In the prepare-commit-msg hook sample there is already commented out code to do that:

https://github.com/git/git/blob/master/templates/hooks--prepare-commit-msg.sample#L35-L36

Alternatively you might want to use `git interpret-trailers` to do that or more fancy trailer related things.

> Could you please add a `--signoff` option to `git merge`?

I am not opposed to add a `--signoff` option to `git merge`, but I think the main plan to improve git in this area has been to first make it possible for git commands that can create commits to accept options like "--trailer 'Signed-off-by: Alice <alice@example.com>'" and to pass them to `git interpret-trailers` (or its underlying code).

Previous: Ævar Arnfjörð Bjarmason
Message 6 of 6 in “Request for git merge --signoff”
  1. Dan KohnJul 1, 2017
  2. Junio C HamanoJul 1, 2017
  3. Dan KohnJul 1, 2017
  4. Junio C HamanoJul 1, 2017
  5. Ævar Arnfjörð BjarmasonJul 1, 2017
  6. Christian CouderJul 25, 2017

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.