Redo "revert" using three-way merge machinery.

The reverse patch application using "git apply" sometimes is too
rigid.  Since the user would get used to resolving conflicting merges
by hand during the normal merge experience, using the same machinery
would be more helpful rather than just giving up.

Cherry-picking and reverting are essentially the same operation.
You pick one commit, and apply the difference that commit introduces
to its own commit ancestry chain to the current tree.  Revert applies
the diff in reverse while cherry-pick applies it forward.  They share
the same logic, just different messages and merge direction.

Rewrite "git rebase" using "git cherry-pick".

Signed-off-by: Junio C Hamano <junkio@cox.net>
4 files changed
tree: 10b79491f79ce17c773e37311a01697050cf2383
  1. debian/
  2. Documentation/
  3. mozilla-sha1/
  4. ppc/
  5. t/
  6. templates/
  7. tools/
  8. .gitignore
  9. apply.c
  10. blob.c
  11. blob.h
  12. build-rev-cache.c
  13. cache.h
  14. cat-file.c
  15. checkout-cache.c
  16. clone-pack.c
  17. commit-tree.c
  18. commit.c
  19. commit.h
  20. connect.c
  21. convert-cache.c
  22. COPYING
  23. count-delta.c
  24. count-delta.h
  25. csum-file.c
  26. csum-file.h
  27. daemon.c
  28. date.c
  29. delta.h
  30. diff-cache.c
  31. diff-delta.c
  32. diff-files.c
  33. diff-helper.c
  34. diff-stages.c
  35. diff-tree.c
  36. diff.c
  37. diff.h
  38. diffcore-break.c
  39. diffcore-order.c
  40. diffcore-pathspec.c
  41. diffcore-pickaxe.c
  42. diffcore-rename.c
  43. diffcore.h
  44. entry.c
  45. epoch.c
  46. epoch.h
  47. export.c
  48. fetch-pack.c
  49. fsck-cache.c
  50. get-tar-commit-id.c
  51. git
  52. git-add-script
  53. git-apply-patch-script
  54. git-bisect-script
  55. git-branch-script
  56. git-checkout-script
  57. git-cherry
  58. git-clone-dumb-http
  59. git-clone-script
  60. git-commit-script
  61. git-core.spec.in
  62. git-count-objects-script
  63. git-cvsimport-script
  64. git-diff-script
  65. git-external-diff-script
  66. git-fetch-script
  67. git-format-patch-script
  68. git-log-script
  69. git-ls-remote-script
  70. git-merge-one-file-script
  71. git-octopus-script
  72. git-parse-remote-script
  73. git-prune-script
  74. git-pull-script
  75. git-push-script
  76. git-rebase-script
  77. git-relink-script
  78. git-rename-script
  79. git-repack-script
  80. git-request-pull-script
  81. git-reset-script
  82. git-resolve-script
  83. git-revert-script
  84. git-send-email-script
  85. git-sh-setup-script
  86. git-shortlog
  87. git-status-script
  88. git-tag-script
  89. git-verify-tag-script
  90. git-whatchanged
  91. gitenv.c
  92. gitk
  93. hash-object.c
  94. http-pull.c
  95. ident.c
  96. index.c
  97. init-db.c
  98. INSTALL
  99. local-pull.c
  100. ls-files.c
  101. ls-tree.c
  102. Makefile
  103. merge-base.c
  104. merge-cache.c
  105. mktag.c
  106. object.c
  107. object.h
  108. pack-check.c
  109. pack-objects.c
  110. pack.h
  111. patch-delta.c
  112. patch-id.c
  113. path.c
  114. peek-remote.c
  115. pkt-line.c
  116. pkt-line.h
  117. prune-packed.c
  118. pull.c
  119. pull.h
  120. quote.c
  121. quote.h
  122. read-cache.c
  123. read-tree.c
  124. README
  125. receive-pack.c
  126. refs.c
  127. refs.h
  128. rev-cache.c
  129. rev-cache.h
  130. rev-list.c
  131. rev-parse.c
  132. rev-tree.c
  133. rsh.c
  134. rsh.h
  135. run-command.c
  136. run-command.h
  137. send-pack.c
  138. server-info.c
  139. setup.c
  140. sha1_file.c
  141. sha1_name.c
  142. show-branch.c
  143. show-index.c
  144. show-rev-cache.c
  145. ssh-pull.c
  146. ssh-push.c
  147. strbuf.c
  148. strbuf.h
  149. stripspace.c
  150. tag.c
  151. tag.h
  152. tar-tree.c
  153. test-date.c
  154. test-delta.c
  155. tree.c
  156. tree.h
  157. unpack-file.c
  158. unpack-objects.c
  159. update-cache.c
  160. update-server-info.c
  161. upload-pack.c
  162. usage.c
  163. var.c
  164. verify-pack.c
  165. write-tree.c