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.