[Novalug] diff metadata
Aaron M. Ucko
amu@alum.mit.edu
Mon Jan 5 16:58:33 EST 2015
John Franklin via Novalug <novalug@firemountain.net> writes:
> AIUI, patch is looking for the first line that starts with "index" or "---" to signal the start of a patch. Checkout any git-managed project and type "git show HEAD", you'll see an example of a comment followed by a patch. I'm 90% certain that patch will ignore the first part.
Indeed, patch makes a point of ignoring anything that doesn't look like
actual patch material:
patch tries to skip any leading garbage, apply the diff, and then skip
any trailing garbage. Thus you could feed an article or message con-
taining a diff listing to patch, and it should work. [...]
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu
More information about the Novalug
mailing list