From: Johannes Schindelin Date: Fri, 06 Jun 2008 14:27:11 GMT Subject: Re: [PATCH v2 1/2] Allow git-apply to ignore the hunk headers Message-ID: In-Reply-To: <87iqwmzwcn.fsf@osv.gnss.ru> Hi, On Fri, 6 Jun 2008, Sergei Organov wrote: > Junio C Hamano writes: > > > You read a hunk header line "@@ -l,m +n,o @@", and start counting the > > diff text because you do not trust m and o. When you read the last > > hunk in a patch e-mail, you may hit a e-mail signature separator, like > > what is given by format-patch output at the end. Mistaking that as an > > extra preimage context to remove "^- $" is what I was worried about. > > Don't you think it's time to fix git-format-patch to put some reliable > "end-of-patch" marker line before the signature? This change (along with > refusal to generate brain-damaged empty lines inside hunks) will make > git diffs easily parseable without information from hunk headers. Actually, what do you think the numbers in the hunk headers are good for? They _are_ reliable end-of-hunk markers. And if the next line does not exist, or does not start, it is end-of-diff. Reliable. Simple. Only when you need to get sloppy, things get worse. I need to get sloppy. But that's hardly the fault of format-patch. Ciao, Dscho