git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Move format-patch base commit and prerequisites before email signature
Date: Thu, 08 Sep 2016 11:34:15 -0700	[thread overview]
Message-ID: <xmqqshtags0o.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160908011200.qzvbdt4wjwiji4h5@x> (Josh Triplett's message of "Wed, 7 Sep 2016 18:12:01 -0700")

Josh Triplett <josh@joshtriplett.org> writes:

> Any text below the "-- " for the email signature gets treated as part of
> the signature, and many mail clients will trim it from the quoted text
> for a reply.  Move it above the signature, so people can reply to it
> more easily.
>
> Add tests for the exact format of the email signature, and add tests to
> ensure the email signature appears last.
>
> (Patch by Junio Hamano; tests by Josh Triplett.)
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>
> Does the above seem reasonable, for a patch that incorporates the
> proposed patch from Message-Id
> xmqqh99rpud4.fsf@gitster.mtv.corp.google.com and adds tests?

Other than that I'd probably retitle it, your problem description
looks perfect.  I am still not sure if the code does a reasonable
thing in MIME case, though.

Thanks for tying the loose ends anyway.

> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index b0579dd..a4af275 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -754,9 +754,22 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '
>  	git format-patch --ignore-if-in-upstream HEAD
>  '
>  
> +git_version="$(git --version | sed "s/.* //")"
> +
> +signature() {
> +	printf "%s\n%s\n\n" "-- " "${1:-$git_version}"
> +}

Hmph.  I would actually have expected that you would force a fixed
and an easily noticeable string via format.signature for the purpose
of the test, but I guess this test covers a lot more than what the
purpose of the main part of the patch does (i.e. enforces that the
default signature must be made from the version string of Git).  It
is not a bad thing to test, but it probably does not belong to this
change.  If you _were_ to split the patch in two, that is where I
probably would split, i.e. "we didn't test what the default signature
looks like, or we didn't make sure --signature option overrides the
default signature, so let's test it" as the preliminary preparation,
followed by "having base info after sig is inconvenient, let's move
it and make sure base info stays before sig with additional test" as
the second (and primary) patch.

But a single patch is fine.

Thanks.

  reply	other threads:[~2016-09-08 18:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08  1:12 [PATCH] Move format-patch base commit and prerequisites before email signature Josh Triplett
2016-09-08 18:34 ` Junio C Hamano [this message]
2016-09-08 18:54   ` Josh Triplett
2016-09-08 19:11     ` Junio C Hamano
2016-09-08 20:08     ` Jeff King
2016-09-08 21:24       ` Junio C Hamano
2016-09-09 19:41         ` Junio C Hamano
2016-09-09 20:07           ` Josh Triplett
2016-09-09 20:51             ` Junio C Hamano
2016-09-09 21:00               ` Josh Triplett
2016-09-09 21:16                 ` Junio C Hamano
2016-09-14 22:57                   ` Junio C Hamano
2016-09-14 23:52                     ` Josh Triplett
2016-09-15 17:06                       ` Junio C Hamano

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=xmqqshtags0o.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=josh@joshtriplett.org \
    /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).