git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2 2/3] mailsplit: support unescaping mboxrd messages
Date: Mon, 06 Jun 2016 11:24:53 -0700	[thread overview]
Message-ID: <xmqq7fe2xjii.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160605044641.9221-3-e@80x24.org> (Eric Wong's message of "Sun, 5 Jun 2016 04:46:40 +0000")

Eric Wong <e@80x24.org> writes:

> This will allow us to parse the output of --pretty=mboxrd
> and the output of other mboxrd generators.
>
> Signed-off-by: Eric Wong <e@80x24.org>
> ---
>  Documentation/git-mailsplit.txt |  7 ++++++-
>  builtin/mailsplit.c             | 18 ++++++++++++++++++
>  t/t5100-mailinfo.sh             | 31 +++++++++++++++++++++++++++++++
>  t/t5100/0001mboxrd              |  4 ++++
>  t/t5100/0002mboxrd              |  5 +++++
>  t/t5100/sample.mboxrd           | 19 +++++++++++++++++++
>  6 files changed, 83 insertions(+), 1 deletion(-)
>  create mode 100644 t/t5100/0001mboxrd
>  create mode 100644 t/t5100/0002mboxrd
>  create mode 100644 t/t5100/sample.mboxrd
>
> diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
> index 4d1b871..e3b2a88 100644
> --- a/Documentation/git-mailsplit.txt
> +++ b/Documentation/git-mailsplit.txt
> @@ -8,7 +8,8 @@ git-mailsplit - Simple UNIX mbox splitter program
>  SYNOPSIS
>  --------
>  [verse]
> -'git mailsplit' [-b] [-f<nn>] [-d<prec>] [--keep-cr] -o<directory> [--] [(<mbox>|<Maildir>)...]
> +'git mailsplit' [-b] [-f<nn>] [-d<prec>] [--keep-cr] [--mboxrd]
> +		-o<directory> [--] [(<mbox>|<Maildir>)...]
>  
>  DESCRIPTION
>  -----------
> @@ -47,6 +48,10 @@ OPTIONS
>  --keep-cr::
>  	Do not remove `\r` from lines ending with `\r\n`.
>  
> +--mboxrd::
> +	Input is of the "mboxrd" format and "^>+From " line escaping is
> +	reversed.

This just makes me wonder if there is a practical reason why people
would not want this always enabled.  I just looked at output from

    $ git log --grep='>>*From '

in the kernel repository, and I saw no cases where the committer
really wanted to preserve the leading one or more '>' on that line.
No, I didn't go through all of 150+ such commits, but I did check
the couple dozen of them from the recent history.

Our history also have 5 instances of them, none of which should have
had the leading '>' if the committer were careful.

> diff --git a/t/t5100/sample.mboxrd b/t/t5100/sample.mboxrd
> new file mode 100644
> index 0000000..79ad5ae
> --- /dev/null
> +++ b/t/t5100/sample.mboxrd
> @@ -0,0 +1,19 @@
> +From mboxrd Mon Sep 17 00:00:00 2001
> +From: mboxrd writer <mboxrd@example.com>
> +Date: Fri, 9 Jun 2006 00:44:16 -0700
> +Subject: [PATCH] a commit with escaped From lines
> +
> +>From the beginning, mbox should have been mboxrd

Indeed ;-)

  reply	other threads:[~2016-06-06 18:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-05  4:46 [PATCH v2 0/3] support mboxrd format Eric Wong
2016-06-05  4:46 ` [PATCH v2 1/3] pretty: support "mboxrd" output format Eric Wong
2016-06-05  4:46 ` [PATCH v2 2/3] mailsplit: support unescaping mboxrd messages Eric Wong
2016-06-06 18:24   ` Junio C Hamano [this message]
2016-06-06 23:02     ` Eric Wong
2016-06-05  4:46 ` [PATCH v2 3/3] am: support --patch-format=mboxrd Eric Wong

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=xmqq7fe2xjii.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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).