rebase -i: handle --continue more like non-interactive rebase

Non-interactive rebase requires the working tree to be clean, but
applies what is in the index without requiring the user to do it
herself.  Imitate that, but (since we are interactive, after all)
fire up an editor with the commit message.

It also fixes a subtle bug: a forgotten "continue" was removed, which
led to an infinite loop when continuing without remaining patches.

Both issues noticed by Frank Lichtenheld.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 files changed
tree: 621b19e73777dd5b72e3cf16c56398ff6ac2c85b
  1. arm/
  2. compat/
  3. contrib/
  4. Documentation/
  5. git-gui/
  6. gitweb/
  7. mozilla-sha1/
  8. perl/
  9. ppc/
  10. t/
  11. templates/
  12. xdiff/
  13. .gitignore
  14. .mailmap
  15. alloc.c
  16. archive-tar.c
  17. archive-zip.c
  18. archive.h
  19. attr.c
  20. attr.h
  21. base85.c
  22. blob.c
  23. blob.h
  24. builtin-add.c
  25. builtin-annotate.c
  26. builtin-apply.c
  27. builtin-archive.c
  28. builtin-blame.c
  29. builtin-branch.c
  30. builtin-bundle.c
  31. builtin-cat-file.c
  32. builtin-check-attr.c
  33. builtin-check-ref-format.c
  34. builtin-checkout-index.c
  35. builtin-commit-tree.c
  36. builtin-config.c
  37. builtin-count-objects.c
  38. builtin-describe.c
  39. builtin-diff-files.c
  40. builtin-diff-index.c
  41. builtin-diff-tree.c
  42. builtin-diff.c
  43. builtin-fetch--tool.c
  44. builtin-fmt-merge-msg.c
  45. builtin-for-each-ref.c
  46. builtin-fsck.c
  47. builtin-gc.c
  48. builtin-grep.c
  49. builtin-init-db.c
  50. builtin-log.c
  51. builtin-ls-files.c
  52. builtin-ls-tree.c
  53. builtin-mailinfo.c
  54. builtin-mailsplit.c
  55. builtin-merge-base.c
  56. builtin-merge-file.c
  57. builtin-mv.c
  58. builtin-name-rev.c
  59. builtin-pack-objects.c
  60. builtin-pack-refs.c
  61. builtin-prune-packed.c
  62. builtin-prune.c
  63. builtin-push.c
  64. builtin-read-tree.c
  65. builtin-reflog.c
  66. builtin-rerere.c
  67. builtin-rev-list.c
  68. builtin-rev-parse.c
  69. builtin-revert.c
  70. builtin-rm.c
  71. builtin-runstatus.c
  72. builtin-shortlog.c
  73. builtin-show-branch.c
  74. builtin-show-ref.c
  75. builtin-stripspace.c
  76. builtin-symbolic-ref.c
  77. builtin-tar-tree.c
  78. builtin-unpack-objects.c
  79. builtin-update-index.c
  80. builtin-update-ref.c
  81. builtin-upload-archive.c
  82. builtin-verify-pack.c
  83. builtin-write-tree.c
  84. builtin.h
  85. cache-tree.c
  86. cache-tree.h
  87. cache.h
  88. check-builtins.sh
  89. check-racy.c
  90. color.c
  91. color.h
  92. combine-diff.c
  93. commit.c
  94. commit.h
  95. config.c
  96. config.mak.in
  97. configure.ac
  98. connect.c
  99. convert-objects.c
  100. convert.c
  101. copy.c
  102. COPYING
  103. csum-file.c
  104. csum-file.h
  105. ctype.c
  106. daemon.c
  107. date.c
  108. decorate.c
  109. decorate.h
  110. delta.h
  111. diff-delta.c
  112. diff-lib.c
  113. diff.c
  114. diff.h
  115. diffcore-break.c
  116. diffcore-delta.c
  117. diffcore-order.c
  118. diffcore-pickaxe.c
  119. diffcore-rename.c
  120. diffcore.h
  121. dir.c
  122. dir.h
  123. dump-cache-tree.c
  124. entry.c
  125. environment.c
  126. exec_cmd.c
  127. exec_cmd.h
  128. fast-import.c
  129. fetch-pack.c
  130. fetch.c
  131. fetch.h
  132. fixup-builtins
  133. generate-cmdlist.sh
  134. git-add--interactive.perl
  135. git-am.sh
  136. git-archimport.perl
  137. git-bisect.sh
  138. git-checkout.sh
  139. git-clean.sh
  140. git-clone.sh
  141. git-commit.sh
  142. git-compat-util.h
  143. git-cvsexportcommit.perl
  144. git-cvsimport.perl
  145. git-cvsserver.perl
  146. git-fetch.sh
  147. git-filter-branch.sh
  148. git-instaweb.sh
  149. git-lost-found.sh
  150. git-ls-remote.sh
  151. git-merge-octopus.sh
  152. git-merge-one-file.sh
  153. git-merge-ours.sh
  154. git-merge-resolve.sh
  155. git-merge-stupid.sh
  156. git-merge.sh
  157. git-mergetool.sh
  158. git-p4import.py
  159. git-parse-remote.sh
  160. git-pull.sh
  161. git-quiltimport.sh
  162. git-rebase--interactive.sh
  163. git-rebase.sh
  164. git-relink.perl
  165. git-remote.perl
  166. git-repack.sh
  167. git-request-pull.sh
  168. git-reset.sh
  169. git-send-email.perl
  170. git-sh-setup.sh
  171. git-stash.sh
  172. git-submodule.sh
  173. git-svn.perl
  174. git-svnimport.perl
  175. git-tag.sh
  176. git-verify-tag.sh
  177. GIT-VERSION-GEN
  178. git.c
  179. git.spec.in
  180. gitk
  181. grep.c
  182. grep.h
  183. hash-object.c
  184. help.c
  185. http-fetch.c
  186. http-push.c
  187. http.c
  188. http.h
  189. ident.c
  190. imap-send.c
  191. index-pack.c
  192. INSTALL
  193. interpolate.c
  194. interpolate.h
  195. list-objects.c
  196. list-objects.h
  197. local-fetch.c
  198. lockfile.c
  199. log-tree.c
  200. log-tree.h
  201. mailmap.c
  202. mailmap.h
  203. Makefile
  204. match-trees.c
  205. merge-file.c
  206. merge-index.c
  207. merge-recursive.c
  208. merge-tree.c
  209. mktag.c
  210. mktree.c
  211. object-refs.c
  212. object.c
  213. object.h
  214. pack-check.c
  215. pack-redundant.c
  216. pack-write.c
  217. pack.h
  218. pager.c
  219. patch-delta.c
  220. patch-id.c
  221. patch-ids.c
  222. patch-ids.h
  223. path-list.c
  224. path-list.h
  225. path.c
  226. peek-remote.c
  227. pkt-line.c
  228. pkt-line.h
  229. progress.c
  230. progress.h
  231. quote.c
  232. quote.h
  233. reachable.c
  234. reachable.h
  235. read-cache.c
  236. README
  237. receive-pack.c
  238. reflog-walk.c
  239. reflog-walk.h
  240. refs.c
  241. refs.h
  242. remote.c
  243. remote.h
  244. revision.c
  245. revision.h
  246. rsh.c
  247. rsh.h
  248. run-command.c
  249. run-command.h
  250. send-pack.c
  251. server-info.c
  252. setup.c
  253. sha1_file.c
  254. sha1_name.c
  255. shallow.c
  256. shell.c
  257. show-index.c
  258. sideband.c
  259. sideband.h
  260. ssh-fetch.c
  261. ssh-pull.c
  262. ssh-push.c
  263. ssh-upload.c
  264. strbuf.c
  265. strbuf.h
  266. symlinks.c
  267. tag.c
  268. tag.h
  269. tar.h
  270. test-chmtime.c
  271. test-date.c
  272. test-delta.c
  273. test-genrandom.c
  274. test-match-trees.c
  275. test-sha1.c
  276. test-sha1.sh
  277. trace.c
  278. tree-diff.c
  279. tree-walk.c
  280. tree-walk.h
  281. tree.c
  282. tree.h
  283. unpack-file.c
  284. unpack-trees.c
  285. unpack-trees.h
  286. update-server-info.c
  287. upload-pack.c
  288. usage.c
  289. utf8.c
  290. utf8.h
  291. var.c
  292. write_or_die.c
  293. wt-status.c
  294. wt-status.h
  295. xdiff-interface.c
  296. xdiff-interface.h