git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Cc: <git@vger.kernel.org>, Stephen Boyd <bebarino@gmail.com>
Subject: Re: [PATCH v6] mailinfo: allow e-mail files as input
Date: Thu, 16 Jul 2009 18:05:10 -0700	[thread overview]
Message-ID: <7v1vog6rw9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <f006bbb9c754c80c133798ff70db5b5291dae060.1247766192.git.nicolas.s.dev@gmx.fr> (Nicolas Sebrecht's message of "Thu\, 16 Jul 2009 19\:45\:34 +0200")

Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:

> We traditionally allowed a mbox file or a directory name of a maildir to be
> ...
> Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>

Thanks.

I have one more comment on the test script, but it's something I can
locally fix (iow, there is no need to resend your patch if there is no
other issue pointed out by others, and if you agree to my suggested
improvements).

> diff --git a/t/t4150-am.sh b/t/t4150-am.sh
> index a12bf84..4c99240 100755
> --- a/t/t4150-am.sh
> +++ b/t/t4150-am.sh
> @@ -63,6 +63,53 @@ with the data reset to initial values.
>  
>  EOF
>  
> +cat >rfc2822_email <<EOF
> +Return-Path: <user@domain.name>
> +X-Flags: 0000
> +	999

Please quote that EOF if you do not mean to have any $variable substituted
in the "here document", like this:

	cat >rfc2822_email <<\EOF
        ... here document comes here ...
	EOF

Otherwise reviewers need to waste time looking for what is being replaced
in the huge here document to understand what is going on.

> +Delivered-To: delivery to user@domain.name
> +Received: (qmail invoked by alias); 16 Jul 2009 05:25:49 -0000
> +Received: from vger.knl.xyz (EHLO vger.knl.xyz) [4.3.2.1]
> +  by mx0.gmx.com (mx-us004) with SMTP; 16 Jul 2009 01:25:49 -0400
> ...
> +
> +EOF
> +

The headers look a bit too excessive to my taste, but probably you wanted
to take a real-life example.  If that is the case, I suspect the manually
added X-Flags: at the beginning defeats that purpose, though.  I'd suggest
either removing the hand-munging, or triming the Received: sequence to
make it a bit shorter.

> @@ -222,6 +269,13 @@ test_expect_success 'am takes patches from a Pine mailbox' '
>  	test -z "$(git diff master^..HEAD)"
>  '
>  
> +test_expect_success 'am takes patches from a RFC2822 formated email' '
> +	git checkout first &&
> +	cat rfc2822_email patch1 | git am &&
> +	! test -d .git/rebase-apply &&
> +	test -z "$(git diff master^..HEAD)"
> +'

These days we tend to write the last step

	git diff --exit-code master^ HEAD

which allows "sh t4150-am.sh -i -v" to be more useful when debugging.  But
the existing tests in this script are old fashioned, and you matched their
style in this patch, which is very good.

We probably would want a separate patch to modernize them after 1.6.4,
though.

  reply	other threads:[~2009-07-17  1:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 22:19 [PATCH v3] git-am: fix maildir support regression: accept email file as patch Nicolas Sebrecht
2009-07-15 22:43 ` [PATCH v3] " Nicolas Sebrecht
2009-07-15 22:54 ` [PATCH v3] " Junio C Hamano
2009-07-15 23:56   ` Junio C Hamano
2009-07-16  1:00     ` [PATCH v3] " Nicolas Sebrecht
2009-07-16  2:06       ` Nicolas Sebrecht
2009-07-16  2:30       ` Junio C Hamano
2009-07-16  2:59         ` Nicolas Sebrecht
2009-07-16  0:49   ` Nicolas Sebrecht
2009-07-16  2:41     ` Junio C Hamano
2009-07-16  4:05       ` [PATCH v4] git-am: allow e-mail file(s) as input Nicolas Sebrecht
2009-07-16  4:10         ` [PATCH v4] " Nicolas Sebrecht
2009-07-16  5:23       ` [PATCH v5] " Nicolas Sebrecht
2009-07-16  7:09         ` Stephen Boyd
2009-07-16  7:24           ` Junio C Hamano
2009-07-16  7:50             ` [PATCH v5] " Nicolas Sebrecht
2009-07-16  8:06               ` Nicolas Sebrecht
2009-07-16  8:17                 ` Johannes Sixt
2009-07-16  8:12               ` Johannes Sixt
2009-07-16 17:45             ` [PATCH v6] mailinfo: allow e-mail files " Nicolas Sebrecht
2009-07-17  1:05               ` Junio C Hamano [this message]
2009-07-17  2:20                 ` [PATCH v6] " Nicolas Sebrecht
2009-07-17 10:06               ` [PATCH v6] " Nanako Shiraishi
2009-07-17 19:54                 ` Junio C Hamano
2009-07-17 22:04                   ` [PATCH v6] " Nicolas Sebrecht
2009-08-06 17:07                     ` [PATCH v7] " Nicolas Sebrecht

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

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

  git send-email \
    --in-reply-to=7v1vog6rw9.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=bebarino@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nicolas.s.dev@gmx.fr \
    /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.
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 NNTP newsgroup(s).