How can I obtain with git log a series of patches that can be auto-applied?
<p>I want to list the <a href="http://www.archive.org/details/git-history-of-linux" rel="nofollow">complete history of Linux</a> as a series of patches (in unified diff format), which I can process automatically from the first one to today's master. In theory, this would allow me to reconstruct the modern version from the log.  For this I am running the following command:</p>

<p><code>git -c diff.renameLimit=30000 log -m -M -C --pretty=tformat:'commit %H %ct' --topo-order --reverse -U0
</code></p>

<p>Unfortunately, it seems that <code>git log</code>, either due to incorrect options that I give it or due to a bug, starts (after 1280 commits) outputting differences that do not match the preceding state, and therefore cannot be applied automatically (e.g. through patch).</p>

<p>As an example, running <code>git log -m -M -C --pretty=tformat:'commit %H %ct' --topo-order --reverse -U0 43acd296..9b7855ca -- drivers/usb/auerswald.c</code>
generates a diff that <em>patch(1)</em> cannot apply to the checked out system at revision <code>43acd296</code>.  (The problem is the same as the one occurring with the continuous log output.) In contrast, running <code>git diff -U0 43acd296 9b7855ca -- drivers/usb/auerswald.c</code> generates a diff that can be applied to revision <code>43acd296</code> without a problem.</p>

<p>Are there any additional options I should be giving to <code>git log</code> in order to obtain the output I want?  (I tried <code>--full-history</code>, but the problem persisted.)</p>