git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jon Seymour <jon.seymour@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] git-am: Ignore whitespace before patches
Date: Wed, 11 Aug 2010 22:55:14 +0000	[thread overview]
Message-ID: <AANLkTind7ZtTS+Fi-tOSE7ExgD1ubhpLuxYJgWYms2aE@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin2DM-q7acST-x_Oz7jU-hODy8se6sngGxTDi_9@mail.gmail.com>

On Wed, Aug 11, 2010 at 22:50, Jon Seymour <jon.seymour@gmail.com> wrote:
> On Thu, Aug 12, 2010 at 5:57 AM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> Change git-am to ignore whitespace (as defined by sh's read) at the
>> beginning of patches.
>>
>> This makes git-am work with patches downloaded from the GMail web
>> interface, here's an example from a raw Gmail attachment produced with
>> `hexdump -C':
>>
>>    20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
>>    20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 0a  |               .|
>>    52 65 74 75 72 6e 2d 50  61 74 68 3a 20 3c 61 76  |Return-Path: <av|
>>
>> Having to tell GMail users that they must manually edit their patches
>> before git-am will accept them (as this article does:
>> http://evag.evn.am/git/git-and-gmail) isn't optimal.
>
> This is a good point. Current behaviour discourages testing of patches
> as delivered by e-mail since the GMail user is more likely to overlook
> actual whitespace errors in a patch because they come to expect this
> usual failure.

Just to clarify, git-am doesn't print a whitespace error on GMail
patches currently, the detection just fails:

    $ git am ~/Desktop/mail.txt
    Patch format detection failed.

But with my patch:

    $ git am ~/Desktop/mail.txt
    Applying: git-am: Ignore whitespace before patches

  reply	other threads:[~2010-08-11 22:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 17:23 [PATCH] git-am: Ignore whitespace before patches Ævar Arnfjörð Bjarmason
2010-06-09 15:35 ` Ævar Arnfjörð Bjarmason
2010-06-10 16:51 ` Junio C Hamano
2010-06-10 17:03   ` Ævar Arnfjörð Bjarmason
2010-08-11 19:57 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2010-08-11 22:50   ` Jon Seymour
2010-08-11 22:55     ` Ævar Arnfjörð Bjarmason [this message]
2010-08-12 19:13   ` Jay Soffian
2010-08-12 20:04     ` Ævar Arnfjörð Bjarmason
2010-08-12 20:24     ` Jonathan Nieder
2010-08-12 21:34       ` 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

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

  git send-email \
    --in-reply-to=AANLkTind7ZtTS+Fi-tOSE7ExgD1ubhpLuxYJgWYms2aE@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jon.seymour@gmail.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 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).