diffs in changelogs

Andrew Morton
2015-06-11T20:40:10Z

People often put diff snippets in changelogs. This causes problems
when one tries to apply a file containing both the changelog and the
diff because patch(1) tries to apply the diff which it found in the
changelog.

eg, something like

git show d24a6e1087030b6da | patch -p1

will go haywire.

So can we please have a checkpatch test warning people away from doing
this?

patch(1) seems to be really promiscuous in its detection of a patch. I
haven't had much success searching for "^--- " and similar. What works
best for me is searching for "^[whitespace]@@ -".

Thanks.