From: Junio C Hamano <gitster@pobox.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: git@vger.kernel.org
Subject: Re: git format-patch --signoff
Date: Thu, 21 Oct 2021 15:34:39 -0700 [thread overview]
Message-ID: <xmqqo87ihurk.fsf@gitster.g> (raw)
In-Reply-To: YXHaAu2G51vy5H8z@qmqm.qmqm.pl
Michał Mirosław <mirq-linux@rere.qmqm.pl> writes:
> I just noticed that `git format-patch --signoff` adds the 'Signed-off-by'
> line even if the exact same line is already present in the commit message.
> Could this be avoided in the tool?
>
> git version 2.30.2
>
> Best Regards
> Michał Mirosław
The rule should be "avoid adding the same sign-off as the one at the
end". In other words, as a record of the flow of patch custody,
Signed-off-by: original author
Signed-off-by: contributing editor
Signed-off-by: original author
is perfectly reasonable for a patch originally authored, tweaked by
an editor and sent back to the author, and further improved by the
original author, while
Signed-off-by: original author
Signed-off-by: contributing editor
Signed-off-by: contributing editor
sent back to the original author by the editor would not be sane, as
there is no need to repeat the same s-o-b to signal whatever it
might imply (e.g. the editor edited the patch twice before sending
it back).
The test in t4014
https://github.com/git/git/blob/master/t/t4014-format-patch.sh#L1561
test_expect_success 'signoff: the same signoff at the end' '
append_signoff <<-\EOF >actual &&
subject
body
Signed-off-by: C O Mitter <committer@example.com>
EOF
cat >expect <<-\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expect actual
'
It creates a commit with an existing S-o-b by the same person as the
one running the "format-patch --signoff" command (the append-signoff
test helper used there (1) creates a commit with the log message fed
from the standard input, (2) runs format-patch --signoff to show the
commit and emits the Subject and S-o-b lines in it. As we can see,
we expect that the existing signoff is not followed by another copy
of the same signoff.
This test hasn't changed since it was written in Feb 2013, and I
think 2.30.2 is recent enough to conform to the rule to pass this
test.
next prev parent reply other threads:[~2021-10-21 22:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 21:22 git format-patch --signoff Michał Mirosław
2021-10-21 21:33 ` brian m. carlson
2021-10-21 22:04 ` Michał Mirosław
2021-10-21 22:34 ` Junio C Hamano [this message]
2021-10-21 23:37 ` Michał Mirosław
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=xmqqo87ihurk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.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).