All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: please strip MIME-Version and Content-T{ype,ransfer-Encoding} in git am --scissors
Date: Thu, 8 Oct 2015 22:23:43 +0200	[thread overview]
Message-ID: <20151008202343.GU3982@pengutronix.de> (raw)
In-Reply-To: <xmqqio6hqg9a.fsf@gitster.mtv.corp.google.com>

Hello Junio,

On Thu, Oct 08, 2015 at 01:04:01PM -0700, Junio C Hamano wrote:
> Uwe Kleine-König  <u.kleine-koenig@pengutronix.de> writes:
> 
> >> Does this have anything to do with scissors, though?  If you remove
> >> everything before "8< ---" in the body of Tony's message (i.e. keep
> >> the in-body headers starting with "From:" and ending with CTE) and
> >> try again, I would suspect that you will get the same result.
> > No, you're wrong here:
> >
> > ukl@dude.ptx:~/gsrc/linux$ head ~/tmp/1444332661.3982_89.ptx\:2\,RS 
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 6 Oct 2015 05:36:17 -0700
> > Subject: [PATCH] memory: omap-gpmc: Fix unselectable debug option for GPMC
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> >
> > Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug")
> > added a debug option for GPMC, but somehow managed to keep it unselectable.
> 
> I think you are the one who misread my question.  I said "keep the
> in-body headers", didn't I?  If you did the "head", then you would
> see something like this:

Ah got it. Yes, you're right. (Subject and Date are actually different
between real and in-body headers, but that's not important. git am picks
up the in-body headers.)
 
> > ukl@dude.ptx:~/gsrc/linux$ head ~/tmp/1444332661.3982_89.ptx\:2\,RS 
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 6 Oct 2015 05:36:17 -0700
> > Subject: [PATCH] memory: omap-gpmc: Fix unselectable debug option for GPMC
> > ... probably Received: and all other junk from your mailbox ...
> >
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 6 Oct 2015 05:36:17 -0700
> > Subject: [PATCH] memory: omap-gpmc: Fix unselectable debug option for GPMC
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> >
> > Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug")
> > added a debug option for GPMC, but somehow managed to keep it unselectable.
> 
> >> I also think that the "MIME-Version" thing is what gives this;
> >> mailinfo and am do not really use it, and consider that the in-body
> >> header ends there.
> >
> > I failed to follow you here.
> 
> I think if you tried the example with in-body header, you will see
> what I meant.
> 
> >
> >> The right approach to tweak mailinfo to cope with this better would
> >> be to keep a bit more state inside mailinfo.c::handle_commit_msg()
> >> so that if we are (1) using in-body headers, (2) have already seen
> >> _some_ valid in-body header like "Subject:" and "From: ", and (3)
> >> have not seen a blank line, discard lines that we do not care about
> >> (e.g. "MIME-VERSION: 1.0").

The right thing should also happen if MIME-Version comes above Subject
in the body but other than that I'm with you here.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2015-10-08 20:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 20:07 [PATCH 1/2] memory: omap-gpmc: dump "before" state before first modification Uwe Kleine-König
2015-10-06 20:07 ` Uwe Kleine-König
2015-10-06 20:07 ` [PATCH 2/2] memory: omap-gpmc: expand the description of the debug facility Uwe Kleine-König
2015-10-06 20:07   ` Uwe Kleine-König
2015-10-07  7:45   ` Roger Quadros
2015-10-07  7:45     ` Roger Quadros
2015-10-07  7:53     ` Uwe Kleine-König
2015-10-07  7:53       ` Uwe Kleine-König
2015-10-07 10:41       ` Tony Lindgren
2015-10-07 10:41         ` Tony Lindgren
2015-10-07 11:02         ` Uwe Kleine-König
2015-10-07 11:02           ` Uwe Kleine-König
2015-10-07 11:07           ` Roger Quadros
2015-10-07 11:07             ` Roger Quadros
2015-10-07 13:40             ` Tony Lindgren
2015-10-07 13:40               ` Tony Lindgren
2015-10-07 13:55               ` Roger Quadros
2015-10-07 13:55                 ` Roger Quadros
2015-10-08  7:17         ` please strip MIME-Version and Content-T{ype,ransfer-Encoding} in git am --scissors Uwe Kleine-König
2015-10-08 19:28           ` Junio C Hamano
2015-10-08 19:37             ` Uwe Kleine-König
2015-10-08 20:04               ` Junio C Hamano
2015-10-08 20:23                 ` Uwe Kleine-König [this message]
2015-10-09  1:43                 ` [PATCH] mailinfo: ignore in-body header that we do not care about Junio C Hamano
2015-10-07  7:37 ` [PATCH 1/2] memory: omap-gpmc: dump "before" state before first modification Roger Quadros
2015-10-07  7:37   ` Roger Quadros

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=20151008202343.GU3982@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.