Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A stale patch means one that used to apply cleanly to the latest Clojure master version, but due to commits made since the patch was created, it no longer does.  In particular, the output of this command:

Code Block
languagenone
% git am --keep-cr -s < patch_file

includes 'Patch failed' and 'To restore the original branch and stop patching, run "git am --abort"'.  You should do the "git am --abort" to get rid of state of the failed patch attempt left behind by the command above.

"git am" is very "fragile", meaning that if the patch_file was created with one version of the source code, all it takes for the command to fail is a change in any of the lines of context present in the patch file, even if it is not one of the lines being changed by the patch.  This is especially common for files containing unit tests, because people usually add new tests at the end of such a file, and so the lines of context before the new test change if two different patches add a new test to the end of the same file.

...