[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] Re: being nice to patch(1)
From: |
Andrew Morton |
Subject: |
[Quilt-dev] Re: being nice to patch(1) |
Date: |
Mon, 2 Jul 2007 14:56:01 -0700 |
On Mon, 2 Jul 2007 14:40:36 -0700 (PDT)
Linus Torvalds <address@hidden> wrote:
>
>
> On Mon, 2 Jul 2007, Andrew Morton wrote:
> >
> > Thing is, changelog-followed-by-diff is a fairly standard format used by
> > quilt and other such toys.
>
> Sure. And if a tool ends up eating the changelog as a diff, then that tool
> is broken. I really do think that this is a "patch" bug - I really don't
> think that that was a valid traditional diff with the four spaces at the
> head of the line.
>
> Of course, if the changelog-followed-by-diff doesn't have any indentation
> or escaping at all, the changelog entry itself *could* actually have a
> real unified diff in it, and the tool would be unable to tell where the
> actual patch starts.
erk, yes, sometimes people do like to quote a hunk of diff in the changelog
and yes, hell doth break loose.
> But at least "git show" and friends indent the changelog on purpose,
> exactly so that there is never any chance that there could be any real
> ambiguity, and this really was a "patch" bug as far as I can tell.
> Happily, one that is easy to work around, by just telling patch to always
> consider the patch a unified diff.
I'm afraid indenting the changelog with leading spaces doesn't help -
patch(1) still tries to apply the diff.
I guess quilt-and-friends could (should) strip away all text prior to the
first ^--- before feeding to patch(1). That would reliably remove all
git changelog text.
- [Quilt-dev] Re: being nice to patch(1), Andrew Morton, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Linus Torvalds, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1),
Andrew Morton <=
- [Quilt-dev] Re: being nice to patch(1), Linus Torvalds, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Junio C Hamano, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Linus Torvalds, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Johannes Schindelin, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Paolo Ciarrocchi, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Johannes Schindelin, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Theodore Tso, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Linus Torvalds, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Paul Eggert, 2007/07/03
- [Quilt-dev] Re: being nice to patch(1), Linus Torvalds, 2007/07/03