rebase: invoke post-rewrite hook

We have to deal with two separate code paths: a normal rebase, which
actually goes through git-am; and rebase {-m|-s}.

The only small issue with both is that they need to remember the
original sha1 across a possible conflict resolution.  rebase -m
already puts this information in $dotest/current, and we just
introduce a similar file for git-am.

Note that in git-am, the hook really only runs when coming from
git-rebase: the code path that sets the $dotest/original-commit file
is guarded by a test for $dotest/rebasing.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 files changed
tree: 9f5b3f875f308d7e30bf2c3ac56a12519b8ed125
  1. block-sha1/
  2. compat/
  3. contrib/
  4. Documentation/
  5. git-gui/
  6. git_remote_helpers/
  7. gitk-git/
  8. gitweb/
  9. perl/
  10. ppc/
  11. t/
  12. templates/
  13. xdiff/
  14. .gitattributes
  15. .gitignore
  16. .mailmap
  17. abspath.c
  18. advice.c
  19. advice.h
  20. alias.c
  21. alloc.c
  22. archive-tar.c
  23. archive-zip.c
  24. archive.c
  25. archive.h
  26. attr.c
  27. attr.h
  28. base85.c
  29. bisect.c
  30. bisect.h
  31. blob.c
  32. blob.h
  33. branch.c
  34. branch.h
  35. builtin-add.c
  36. builtin-annotate.c
  37. builtin-apply.c
  38. builtin-archive.c
  39. builtin-bisect--helper.c
  40. builtin-blame.c
  41. builtin-branch.c
  42. builtin-bundle.c
  43. builtin-cat-file.c
  44. builtin-check-attr.c
  45. builtin-check-ref-format.c
  46. builtin-checkout-index.c
  47. builtin-checkout.c
  48. builtin-clean.c
  49. builtin-clone.c
  50. builtin-commit-tree.c
  51. builtin-commit.c
  52. builtin-config.c
  53. builtin-count-objects.c
  54. builtin-describe.c
  55. builtin-diff-files.c
  56. builtin-diff-index.c
  57. builtin-diff-tree.c
  58. builtin-diff.c
  59. builtin-fast-export.c
  60. builtin-fetch-pack.c
  61. builtin-fetch.c
  62. builtin-fmt-merge-msg.c
  63. builtin-for-each-ref.c
  64. builtin-fsck.c
  65. builtin-gc.c
  66. builtin-grep.c
  67. builtin-hash-object.c
  68. builtin-help.c
  69. builtin-index-pack.c
  70. builtin-init-db.c
  71. builtin-log.c
  72. builtin-ls-files.c
  73. builtin-ls-remote.c
  74. builtin-ls-tree.c
  75. builtin-mailinfo.c
  76. builtin-mailsplit.c
  77. builtin-merge-base.c
  78. builtin-merge-file.c
  79. builtin-merge-index.c
  80. builtin-merge-ours.c
  81. builtin-merge-recursive.c
  82. builtin-merge-tree.c
  83. builtin-merge.c
  84. builtin-mktag.c
  85. builtin-mktree.c
  86. builtin-mv.c
  87. builtin-name-rev.c
  88. builtin-notes.c
  89. builtin-pack-objects.c
  90. builtin-pack-redundant.c
  91. builtin-pack-refs.c
  92. builtin-patch-id.c
  93. builtin-prune-packed.c
  94. builtin-prune.c
  95. builtin-push.c
  96. builtin-read-tree.c
  97. builtin-receive-pack.c
  98. builtin-reflog.c
  99. builtin-remote.c
  100. builtin-replace.c
  101. builtin-rerere.c
  102. builtin-reset.c
  103. builtin-rev-list.c
  104. builtin-rev-parse.c
  105. builtin-revert.c
  106. builtin-rm.c
  107. builtin-send-pack.c
  108. builtin-shortlog.c
  109. builtin-show-branch.c
  110. builtin-show-ref.c
  111. builtin-stripspace.c
  112. builtin-symbolic-ref.c
  113. builtin-tag.c
  114. builtin-tar-tree.c
  115. builtin-unpack-file.c
  116. builtin-unpack-objects.c
  117. builtin-update-index.c
  118. builtin-update-ref.c
  119. builtin-update-server-info.c
  120. builtin-upload-archive.c
  121. builtin-var.c
  122. builtin-verify-pack.c
  123. builtin-verify-tag.c
  124. builtin-write-tree.c
  125. builtin.h
  126. bundle.c
  127. bundle.h
  128. cache-tree.c
  129. cache-tree.h
  130. cache.h
  131. check-builtins.sh
  132. check-racy.c
  133. check_bindir
  134. color.c
  135. color.h
  136. combine-diff.c
  137. command-list.txt
  138. commit.c
  139. commit.h
  140. config.c
  141. config.mak.in
  142. configure.ac
  143. connect.c
  144. convert.c
  145. copy.c
  146. COPYING
  147. csum-file.c
  148. csum-file.h
  149. ctype.c
  150. daemon.c
  151. date.c
  152. decorate.c
  153. decorate.h
  154. delta.h
  155. diff-delta.c
  156. diff-lib.c
  157. diff-no-index.c
  158. diff.c
  159. diff.h
  160. diffcore-break.c
  161. diffcore-delta.c
  162. diffcore-order.c
  163. diffcore-pickaxe.c
  164. diffcore-rename.c
  165. diffcore.h
  166. dir.c
  167. dir.h
  168. editor.c
  169. entry.c
  170. environment.c
  171. exec_cmd.c
  172. exec_cmd.h
  173. fast-import.c
  174. fetch-pack.h
  175. fixup-builtins
  176. fsck.c
  177. fsck.h
  178. generate-cmdlist.sh
  179. git-add--interactive.perl
  180. git-am.sh
  181. git-archimport.perl
  182. git-bisect.sh
  183. git-compat-util.h
  184. git-cvsexportcommit.perl
  185. git-cvsimport.perl
  186. git-cvsserver.perl
  187. git-difftool--helper.sh
  188. git-difftool.perl
  189. git-filter-branch.sh
  190. git-instaweb.sh
  191. git-lost-found.sh
  192. git-merge-octopus.sh
  193. git-merge-one-file.sh
  194. git-merge-resolve.sh
  195. git-mergetool--lib.sh
  196. git-mergetool.sh
  197. git-parse-remote.sh
  198. git-pull.sh
  199. git-quiltimport.sh
  200. git-rebase--interactive.sh
  201. git-rebase.sh
  202. git-relink.perl
  203. git-repack.sh
  204. git-request-pull.sh
  205. git-send-email.perl
  206. git-sh-setup.sh
  207. git-stash.sh
  208. git-submodule.sh
  209. git-svn.perl
  210. GIT-VERSION-GEN
  211. git-web--browse.sh
  212. git.c
  213. git.spec.in
  214. graph.c
  215. graph.h
  216. grep.c
  217. grep.h
  218. hash.c
  219. hash.h
  220. help.c
  221. help.h
  222. hex.c
  223. http-backend.c
  224. http-fetch.c
  225. http-push.c
  226. http-walker.c
  227. http.c
  228. http.h
  229. ident.c
  230. imap-send.c
  231. INSTALL
  232. levenshtein.c
  233. levenshtein.h
  234. list-objects.c
  235. list-objects.h
  236. ll-merge.c
  237. ll-merge.h
  238. lockfile.c
  239. log-tree.c
  240. log-tree.h
  241. mailmap.c
  242. mailmap.h
  243. Makefile
  244. match-trees.c
  245. merge-file.c
  246. merge-recursive.c
  247. merge-recursive.h
  248. name-hash.c
  249. notes.c
  250. notes.h
  251. object.c
  252. object.h
  253. pack-check.c
  254. pack-refs.c
  255. pack-refs.h
  256. pack-revindex.c
  257. pack-revindex.h
  258. pack-write.c
  259. pack.h
  260. pager.c
  261. parse-options.c
  262. parse-options.h
  263. patch-delta.c
  264. patch-ids.c
  265. patch-ids.h
  266. path.c
  267. pkt-line.c
  268. pkt-line.h
  269. preload-index.c
  270. pretty.c
  271. progress.c
  272. progress.h
  273. quote.c
  274. quote.h
  275. reachable.c
  276. reachable.h
  277. read-cache.c
  278. README
  279. reflog-walk.c
  280. reflog-walk.h
  281. refs.c
  282. refs.h
  283. remote-curl.c
  284. remote.c
  285. remote.h
  286. replace_object.c
  287. rerere.c
  288. rerere.h
  289. resolve-undo.c
  290. resolve-undo.h
  291. revision.c
  292. revision.h
  293. run-command.c
  294. run-command.h
  295. send-pack.h
  296. server-info.c
  297. setup.c
  298. sha1-lookup.c
  299. sha1-lookup.h
  300. sha1_file.c
  301. sha1_name.c
  302. shallow.c
  303. shell.c
  304. shortlog.h
  305. show-index.c
  306. sideband.c
  307. sideband.h
  308. sigchain.c
  309. sigchain.h
  310. strbuf.c
  311. strbuf.h
  312. string-list.c
  313. string-list.h
  314. submodule.c
  315. submodule.h
  316. symlinks.c
  317. tag.c
  318. tag.h
  319. tar.h
  320. test-chmtime.c
  321. test-ctype.c
  322. test-date.c
  323. test-delta.c
  324. test-dump-cache-tree.c
  325. test-genrandom.c
  326. test-index-version.c
  327. test-match-trees.c
  328. test-parse-options.c
  329. test-path-utils.c
  330. test-run-command.c
  331. test-sha1.c
  332. test-sha1.sh
  333. test-sigchain.c
  334. thread-utils.c
  335. thread-utils.h
  336. trace.c
  337. transport-helper.c
  338. transport.c
  339. transport.h
  340. tree-diff.c
  341. tree-walk.c
  342. tree-walk.h
  343. tree.c
  344. tree.h
  345. unimplemented.sh
  346. unpack-trees.c
  347. unpack-trees.h
  348. upload-pack.c
  349. usage.c
  350. userdiff.c
  351. userdiff.h
  352. utf8.c
  353. utf8.h
  354. walker.c
  355. walker.h
  356. wrap-for-bin.sh
  357. wrapper.c
  358. write_or_die.c
  359. ws.c
  360. wt-status.c
  361. wt-status.h
  362. xdiff-interface.c
  363. xdiff-interface.h