Re: Using "From" to start commit message
Jeremy Kerr writes: > Carl - I see you've done some work on git am's parser for From_ syntax; > do you know what's happening here? Git is surprisingly broken with regard to commit messages containing the sequence of "From " at the beginning of a line. I didn't finish the patch I wanted to write here. If I had, I would have demonstrated that the current combination of "git format-patch" and "git am" cannot successfully replay git's own history, but my imagined, improved version would be able to. (And, also interesting, you can find a bunch of totally garbled commits in git's history because of this issue. Things where there is a commit message that's actually one commit message, some patch content, and then another commit message all run together). I don't recall the details of the patch I had envisioned, but basically, it was following the best-practice for reversible mailbox escaping from "From " lines. There's one obviously-correct approach that is reversible, but annoyingly, much software, (including git when I last looked), doesn't use it. -Carl pgpy2FB3f3IXv.pgp Description: PGP signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Re: Using "From" to start commit message
Hi Thierry, > I've noticed something strange happening when a commit message starts > with the word "From". When downloading the commit as mbox, I see that > the line is "escaped" using a '>' character, which causes git am to > ignore the line. > > This can be seen in the following patch for example: > > http://patchwork.ozlabs.org/patch/330330/ > > I'm not familiar with the internals of patchwork, but I would expect > this to be perfectly legal in a commit message. I could imagine that > to be special treatment for From lines in mailboxes, but that should > not apply to the text in commit messages. Hm, interesting. This escaping is generally required for the file to be a valid mbox; the 'From' sequence defines the beginning of a new message (hence the escaping with '>'), but it looks like this isn't what git am expects. We could generate the message without the escaping (and drop the initial From_ line too), but that may break other uses of the mailbox files. I'm not sure how many other consumers there are though... Carl - I see you've done some work on git am's parser for From_ syntax; do you know what's happening here? Regards, Jeremy ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork
Using "From" to start commit message
Hi, I've noticed something strange happening when a commit message starts with the word "From". When downloading the commit as mbox, I see that the line is "escaped" using a '>' character, which causes git am to ignore the line. This can be seen in the following patch for example: http://patchwork.ozlabs.org/patch/330330/ I'm not familiar with the internals of patchwork, but I would expect this to be perfectly legal in a commit message. I could imagine that to be special treatment for From lines in mailboxes, but that should not apply to the text in commit messages. Thierry pgpoKEtP11CL4.pgp Description: PGP signature ___ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork