git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] git-am: Ignore whitespace before patches

From
Jay Soffian <jaysoffian@gmail.com>
Date
Aug 12, 2010, 19:13 UTC
Message-ID
<AANLkTinDHvwHLZfj6DDPtV39Z2xhDZREiqwdt5cjiaLP@mail.gmail.com>
In-Reply-To
<1281556645-23361-1-git-send-email-avarab@gmail.com>

On Wed, Aug 11, 2010 at 3:57 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 8 quoted lines
>> Actually cut-and-paste is often a major source of whitespace breakage
>> (including tabs silently being expanded), and I personally think a patch
>> like this to encourage the practice is going in a wrong direction.
>
> I disagree and think git-am should be smarter. Any human looking at
> something like a GMail mail.txt download will clearly see that it's a
> patch, but git-am is pedantic and doesn't skip past whitespace at the
> beginning of the file.

The point of git-am being pedantic is to prevent the original patch from being applied w/silent corruption (e.g., tabs-to-spaces).

Perhaps, before making git-am less strict, we should modify format-patch to include a sha1 of the diff output so that corruption can be reliably detected by git-am.

Just a thought.
j.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 11 in “git-am: Ignore whitespace before patches”
  1. git-am: Ignore whitespace before patchesÆvar Arnfjörð Bjarmason, May 15, 2010
  2. Ævar Arnfjörð BjarmasonJun 9, 2010
  3. Junio C HamanoJun 10, 2010
  4. Ævar Arnfjörð BjarmasonJun 10, 2010
  5. git-am: Ignore whitespace before patchesÆvar Arnfjörð Bjarmason, Aug 11, 2010
  6. Jon SeymourAug 11, 2010
  7. Ævar Arnfjörð BjarmasonAug 11, 2010
  8. Jay SoffianAug 12, 2010
  9. Ævar Arnfjörð BjarmasonAug 12, 2010
  10. Jonathan NiederAug 12, 2010
  11. Junio C HamanoAug 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.