git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "Łukasz Gryglicki" <lukaszgryglicki@o2.pl>, git@vger.kernel.org
Subject: Re: [PATCH v2] add --signoff flag to `git-merge` command.
Date: Tue, 04 Jul 2017 10:42:40 -0700	[thread overview]
Message-ID: <xmqqzickjdyn.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <87tw2sbnyl.fsf@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Tue, 04 Jul 2017 10:33:54 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Tue, Jul 04 2017, Łukasz Gryglicki jotted:
>
>> add --signoff flag to `git-merge` command.
>
> We'd usually say this as:
>
> merge: add a --signoff flag
>
> Or something like that.

I thought I gave a fairly complete example that can be imitated, but
apparently it didn't go through X-<.

>> Some projects require every commit to be signed off.
>> Our workflow is to create feature branches and require every commit to
>> be signed off. When feature is finally approved we need to merge it into
>> master. Merge itself is usually trivial and is done by
>> `git merge origin/master`. Unfortunatelly this command have no --signoff
>> flag, so we need to either add signoff line manually or use
>> `git commit --amend -s` after the merge. First solution is not ideal
>> because not all developers are familiar with exact sign-off syntax.
>> The second solution works, but is obviously tedious.
>> This patch adds --signoff support to git-merge command. It works just
>> like --signoff in `git-commit` command.
>
> It would be nice to split this into a at least a couple of paragraphs,
> and more closely follow the format suggested by
> Documentation/SubmittingPatches.

Good suggestion.

>> More details here:
>> https://public-inbox.org/git/CAHv71zK5SqbwrBFX=a8-DY9H3KT4FEyMgv__p2gZzNr0WUAPUw@mail.gmail.com/T/#u
>
> These more details include my outstanding question in
> 87fueferd4.fsf@gmail.com which hasn't been answered yet.

I have an opinion on that topic, but I'd prefer to hear from others
first before I speak out.

>> diff --git a/t/t9904-git-merge-signoff.sh b/t/t9904-git-merge-signoff.sh
>> new file mode 100755
>> index 0000000000000..f542f136f5dda
>> --- /dev/null
>> +++ b/t/t9904-git-merge-signoff.sh
>
> The convention for adding new tests is not to add a new one after
> whatever name sorts the highest, see "Naming Tests" in t/README.

Correct.

> I.e. this should be somewhere in t[6-7]* with the other merge tests.

Yeah.  While most of t[67]??? series are about the contents of the
merge, i.e. resulting trees and what happens in the working tree,
there are some tests about the merge messages in there.  t7608 is
exactly about how the command prepares the messages before giving
them to human to edit, and I think "merge can be told to optionally
add sign-off" fits there just fine.  All existing tests there are
only interested about the title, but that does not mean there must
not be tests that care more than the title in the script.

Also, as you suggest, these will become a lot shorter when the
standard test helper shell functions are used.  I do not think we
necessarily want a brand new test script to test only three or so
combinations (i.e. last one wins when --option and --no-option is
given, --option has an effect, --no-option does not have an effect).

  reply	other threads:[~2017-07-04 17:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03  9:57 [PATCH] area: git-merge: add --signoff flag to git-merge Łukasz Gryglicki
2017-07-03 17:57 ` Junio C Hamano
2017-07-04  6:20 ` [PATCH v2] add --signoff flag to `git-merge` command Łukasz Gryglicki
2017-07-04  8:33   ` Ævar Arnfjörð Bjarmason
2017-07-04 17:42     ` Junio C Hamano [this message]
2017-07-04  9:33   ` [PATCH v3] merge: add a --signoff flag Łukasz Gryglicki
2017-07-24  6:14     ` lukaszgryglicki
2017-07-24  7:02       ` Junio C Hamano
2017-07-24 20:42         ` Junio C Hamano
2017-07-25  5:00           ` lukaszgryglicki
2017-07-25  5:10             ` Stefan Beller
2017-07-25 11:28           ` lukaszgryglicki
2017-07-25 18:41     ` Junio C Hamano
     [not found]       ` <7A9ED766-4A25-4F34-8E02-3DFCE1D63ADF@o2.pl>
2017-07-26  7:34         ` Junio C Hamano
2017-07-26  7:39     ` [PATCH v4] " Łukasz Gryglicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzickjdyn.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lukaszgryglicki@o2.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).