From: Paul Tan Date: Tue, 4 Aug 2015 13:52:02 +0000 (+0800) Subject: builtin-am: support and auto-detect mercurial patches X-Git-Tag: v2.6.0-rc0~77^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/94cd175cff196d2571bc2e17ad8e9f47ef4b3911?ds=inline;hp=94cd175cff196d2571bc2e17ad8e9f47ef4b3911 builtin-am: support and auto-detect mercurial patches Since 0cfd112 (am: preliminary support for hg patches, 2011-08-29), git-am.sh could convert mercurial patches to an RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state directory for application. Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh was able to auto-detect mercurial patches by checking if the file begins with the line: # HG changeset patch Re-implement the above in builtin/am.c. Helped-by: Stefan Beller Signed-off-by: Paul Tan Signed-off-by: Junio C Hamano ---