diffs in changelogs

From: Andrew Morton
Date: Thu Jun 11 2015 - 16:40:14 EST



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/