]> git.lizzy.rs Git - plan9front.git/commit
git/{diff,import}: make it easier to handle manually-asembled patch emails
authorori@eigenstate.org <ori@eigenstate.org>
Sun, 22 Aug 2021 17:18:35 +0000 (17:18 +0000)
committerori@eigenstate.org <ori@eigenstate.org>
Sun, 22 Aug 2021 17:18:35 +0000 (17:18 +0000)
commitabe0534492a790de821b520129c70628ba54ed48
tree1454a148c03d53c3f54864e98a18d60500db6985
parent0f58e47551345d7c48c9404bc4188f7fc195e51a
git/{diff,import}: make it easier to handle manually-asembled patch emails
Often, people (including myself) will write emails that
can almost be applied with git/import.  This changes
git/diff and git/import so that things will generally
work even when assembling diffs by hand:

1. git/import becomes slightly more lax:

^diff ...
^--- ...

will both be detected as the start of a patch.

2.  git/diff produces the same format of diff
as git/export, starting with paths:

--- a/path/to/file
+++ b/path/to/file

which means that the 'ape/patch -p1' used
within git/import will just work.

So with this, if you send an email to the mailing list,
write up a committable description, and append the
output of git/diff to the end of the email, git/import
should just work.

[this patch was send through the mailing list using the
above procedure, and will be committed with git/import
to verify that it works as advertised]
sys/src/cmd/git/diff
sys/src/cmd/git/import