aboutsummaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
Commit message (Collapse)AuthorAge
* t3404: add test case for abbreviated commandsLiam Beguin2017-12-05
| | | | | | | | | Make sure the todo list ends up using single-letter command abbreviations when the rebase.abbreviateCommands is enabled. This configuration option should not change anything else. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jk/rebase-i-exec-gitdir-fix'Junio C Hamano2017-11-06
|\ | | | | | | | | | | | | | | A recent regression in "git rebase -i" that broke execution of git commands from subdirectories via "exec" insn has been fixed. * jk/rebase-i-exec-gitdir-fix: sequencer: pass absolute GIT_DIR to exec commands
| * sequencer: pass absolute GIT_DIR to exec commandsJacob Keller2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we replaced the old shell script based interactive rebase in commmit 18633e1a22a6 ("rebase -i: use the rebase--helper builtin", 2017-02-09) we introduced a regression of functionality in that the GIT_DIR would be sent to the environment of the exec command as-is. This generally meant that it would be passed as "GIT_DIR=.git", which causes problems for any exec command that wants to run git commands in a subdirectory. This isn't a very large regression, since it is not that likely that the exec command will run a git command, and even less likely that it will need to do so in a subdir. This regression was discovered by a build system which uses git-describe to find the current version of the build system, and happened to do so from the src/ sub directory of the project. Fix this by passing in the absolute path of the git directory into the child environment. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t3404: relax rebase.missingCommitsCheck testsJohannes Schindelin2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests were a bit anal about the *exact* warning/error message printed by git rebase. But those messages are intended for the *end user*, therefore it does not make sense to test so rigidly for the *exact* wording. In the following, we will reimplement the missing commits check in the sequencer, with slightly different words. So let's just test for the parts in the warning/error message that we *really* care about, nothing more, nothing less. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'pw/rebase-i-regression-fix-tests'Junio C Hamano2017-06-30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a recent regression to "git rebase -i" and add tests that would have caught it and others. * pw/rebase-i-regression-fix-tests: t3420: fix under GETTEXT_POISON build rebase: add more regression tests for console output rebase: add regression tests for console output rebase -i: add test for reflog message sequencer: print autostash messages to stderr
| * | rebase -i: add test for reflog messagePhillip Wood2017-06-19
| |/ | | | | | | | | | | | | | | Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | tests: fix tests broken under GETTEXT_POISON=YesPleaseÆvar Arnfjörð Bjarmason2017-05-11
|/ | | | | | | | | | | | | | | | | | | | | | | The GETTEXT_POISON=YesPlease compile-time testing option added in my bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly translator", 2011-02-22) has been slowly bitrotting as strings have been marked for translation, and new tests have been added without running it. I brought this up on the list ("[BUG] test suite broken with GETTEXT_POISON=YesPlease", [1]) asking whether this mode was useful at all anymore. At least one person occasionally uses it, and Lars Schneider offered to change one of the the Travis builds to run in this mode, so fix up the failing ones. My test setup runs most of the tests, with the notable exception of skipping all the p4 tests, so it's possible that there's still some lurking regressions I haven't fixed. 1. <CACBZZX62+acvi1dpkknadTL827mtCm_QesGSZ=6+UnyeMpg8+Q@mail.gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: use the rebase--helper builtinJohannes Schindelin2017-02-09
| | | | | | | | | | | | | | | | | | | | | | Now that the sequencer learned to process a "normal" interactive rebase, we use it. The original shell script is still used for "non-normal" interactive rebases, i.e. when --root or --preserve-merges was passed. Please note that the --root option (via the $squash_onto variable) needs special handling only for the very first command, hence it is still okay to use the helper upon continue/skip. Also please note that the --no-ff setting is volatile, i.e. when the interactive rebase is interrupted at any stage, there is no record of it. Therefore, we have to pass it from the shell script to the rebase--helper. Note: the test t3404 had to be adjusted because the the error messages produced by the sequencer comply with our current convention to start with a lower-case letter. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sequencer: update reading author-scriptJohannes Schindelin2017-01-17
| | | | | | | | | | | | | | Rather than abusing a strbuf to come up with an environment block, let's just use the argv_array structure which serves the same purpose much better. While at it, rename the function to reflect the fact that it does not really care exactly what environment variables are defined in said file. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/rebase-i-commentchar-fix'Junio C Hamano2016-11-23
|\ | | | | | | | | | | | | | | | | | | | | "git rebase -i" did not work well with core.commentchar configuration variable for two reasons, both of which have been fixed. * js/rebase-i-commentchar-fix: rebase -i: handle core.commentChar=auto stripspace: respect repository config rebase -i: highlight problems with core.commentchar
| * rebase -i: handle core.commentChar=autoJohannes Schindelin2016-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | When 84c9dc2 (commit: allow core.commentChar=auto for character auto selection, 2014-05-17) extended the core.commentChar functionality to allow for the value 'auto', it forgot that rebase -i was already taught to handle core.commentChar, and in turn forgot to let rebase -i handle that new value gracefully. Reported by Taufiq Hoven. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * rebase -i: highlight problems with core.commentcharJohannes Schindelin2016-11-21
| | | | | | | | | | | | | | | | | | The interactive rebase does not currently play well with core.commentchar. Let's add some tests to highlight those problems that will be fixed in the remainder of the series. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i: improve advice on bad instruction linesRalf Thielow2016-09-07
| | | | | | | | | | | | | | | | | | | | | | If we found bad instruction lines in the instruction sheet of interactive rebase, we give the user advice on how to fix it. However, we don't tell the user what to do afterwards. Give the user advice to run 'git rebase --continue' after the fix. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t3404: become resilient to GETTEXT_POISONVasco Almeida2016-08-12
| | | | | | | | | | | | | | | | The concerned test greps the output of exit_with_patch() in git-rebase--interactive.sh script. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/rebase-i-tests'Junio C Hamano2016-07-28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | A few tests that specifically target "git rebase -i" have been added. * js/rebase-i-tests: rebase -i: we allow extra spaces after fixup!/squash! rebase -i: demonstrate a bug with --autosquash t3404: add a test for the --gpg-sign option
| * | t3404: add a test for the --gpg-sign optionJohannes Schindelin2016-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the upcoming rebase--helper work (which will accelerate the interactive rebase noticably), it is important to verify that the --gpg-sign option is handled properly. Please note that this patch does this on the cheap, by verifying that the expected option is printed in the message of the 'edit' operation. We really should test that the interactive rebase signs the commits properly, iff GPG is available. This test is left for later. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/t3404-grammo-fix'Junio C Hamano2016-07-13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Grammofix. * js/t3404-grammo-fix: t3404: fix a grammo (commands are ran -> commands are run)
| * | | t3404: fix a grammo (commands are ran -> commands are run)Johannes Schindelin2016-06-29
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | tests: unpack-trees: update to use test_i18n* functionsVasco Almeida2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use functions test_i18ncmp and test_i18ngrep to successfully pass tests running under GETTEXT_POISON. The output strings compared to in these test were marked for translation in ed47fdf ("i18n: unpack-trees: mark strings for translation", 2016-04-09) and later improved in 2e3926b ("i18n: unpack-trees: avoid substituting only a verb in sentences", 2016-05-12). Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | i18n: rebase-interactive: mark here-doc strings for translationVasco Almeida2016-06-17
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use pipe to send gettext output to git stripspace instead of the original method of using shell here-document, because command substitution '$(...)' would not take place inside the here-documents. The exception is the case of the last here-document redirecting to cat, in which commands substitution works and, thus, is preserved in this commit. t3404: adapt test to the strings newly marked for translation Test t3404-rebase-interactive.sh would fail under GETTEXT_POISON unless using test_i18ngrep. Add eval_ngettext fallback functions to be called when running, for instance, under GETTEXT_POISON. Otherwise, tests would fail under GETTEXT_POISON, or other build that doesn't support the GNU gettext, because that function could not be found. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t3404: fix typoJohannes Schindelin2016-05-10
| | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jk/use-write-script-more'Junio C Hamano2016-04-22
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | Code clean-up. * jk/use-write-script-more: t3404: use write_script t1020: do not overuse printf and use write_script t5532: use write_script
| * | t3404: use write_scriptJunio C Hamano2016-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test uses hardcoded #!/bin/sh to create a pre-commit hook script. Because the generated script uses $(command substitution), which is not supported by /bin/sh on some platforms (e.g. Solaris), the resulting pre-commit always fails. Which is not noticeable as the test that uses the hook is about checking the behaviour of the command when the hook fails ;-), but nevertheless it is not testing what we wanted to test. Use write_script so that the resulting script is run under the same shell our scripted Porcelain commands are run, which must support the necessary $(construct). Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | t3404: cleanup double empty lines between testsStefan Beller2016-03-18
| | | | | | | | | | | | | | | Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | rebase: decouple --exec from --interactiveStefan Beller2016-03-18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the later steps of preparing a patch series I do not want to edit or reorder the patches any more, but just make sure the test suite passes after each patch and also to fix breakage right there if some of the steps fail. I could run EDITOR=true git rebase -i <anchor> -x "make test" but it would be simpler if it can be spelled like so: git rebase <anchor> -x "make test" Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i: remember merge options beyond continue actionsFabian Ruch2015-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user explicitly specified a merge strategy or strategy options, continue to use that strategy/option after "rebase --continue". Add a test of the corrected behavior. If --merge is specified or implied by -s or -X, then "strategy and "strategy_opts" are set to values from which "strategy_args" can be derived; otherwise they are set to empty strings. Either way, their values are propagated from one step of an interactive rebase to the next via state files. "do_merge", on the other hand, is *not* propagated to later steps of an interactive rebase. Therefore, making the initialization of "strategy_args" conditional on "do_merge" being set prevents later steps of an interactive rebase from setting it correctly. Luckily, we don't need the "do_merge" guard at all. If the rebase was started without --merge, then "strategy" and "strategy_opts" are both the empty string, which results in "strategy_args" also being set to the empty string, which is just what we want in that situation. So remove the "do_merge" guard and derive "strategy_args" from "strategy" and "strategy_opts" every time. Reported-by: Diogo de Campos <campos@esss.com.br> Signed-off-by: Fabian Ruch <bafain@gmail.com> Helped-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'cb/t3404-shellquote' into maintJunio C Hamano2015-12-11
|\ \ | | | | | | | | | | | | * cb/t3404-shellquote: t3404: fix quoting of redirect for some versions of bash
| * | t3404: fix quoting of redirect for some versions of bashCharles Bailey2015-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | As CodingGuidelines says, some versions of bash errors out when $variable substitution is used as the target for redirection without being quoted (even though POSIX may not require such a quote). Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'gr/rebase-i-drop-warn' into maintJunio C Hamano2015-11-03
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent update to "rebase -i" that tries to sanity check the edited insn sheet before it uses it has become too picky on Windows where CRLF left by the editor is turned into a trailing CR on the line read via the "read" built-in command. * gr/rebase-i-drop-warn: rebase-i: work around Windows CRLF line endings t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings
| * | | rebase-i: work around Windows CRLF line endingsJunio C Hamano2015-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Editors on Windows can and do save text files with CRLF line endings, which is the convention on the platform. We are seeing reports that the "read" command in a port of bash to the environment however does not strip the CRLF at the end, not adjusting for the same convention on the platform. This breaks the recently added sanity checks for the insn sheet fed to "rebase -i"; instead of an empty line (hence nothing in $command), the script was getting a lone CR in there. Special case a lone CR and treat it the same way as an empty line to work this around. This patch (also) passes the test with Git for Windows, where the issue was seen first. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endingsJohannes Schindelin2015-10-28
| |/ / | | | | | | | | | | | | | | | | | | Based on a bug report by Chad Boles. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'gr/rebase-i-drop-warn' into maintJunio C Hamano2015-10-16
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | "git rebase -i" had a minor regression recently, which stopped considering a line that begins with an indented '#' in its insn sheet not a comment, which is now fixed. * gr/rebase-i-drop-warn: rebase-i: loosen over-eager check_bad_cmd check rebase-i: explicitly accept tab as separator in commands
| * | rebase-i: loosen over-eager check_bad_cmd checkMatthieu Moy2015-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 804098bb (git rebase -i: add static check for commands and SHA-1, 2015-06-29) tried to check all insns before running any in the todo list, but it did so by implementing its own parser that is a lot stricter than necessary. We used to allow lines that are indented (including comment lines), and we used to allow a whitespace between the insn and the commit object name to be HT, among other things, that are flagged as an invalid line by mistake. Fix this by using the same tokenizer that is used to parse the todo list file in the new check. Whether it's a good thing to accept indented comments is debatable (other commands like "git commit" do not accept them), but we already accepted them in the past, and some people and scripts rely on this behavior. Also, a line starting with space followed by a '#' cannot have any meaning other than being a comment, hence it doesn't harm to accept them as comments. Largely based on patch by: Junio C Hamano <gitster@pobox.com> [jc: updated test with quickfix from Torsten Bögershausen] Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'dt/reflog-tests'Junio C Hamano2015-08-12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests that assume how reflogs are represented on the filesystem too much have been corrected. * dt/reflog-tests: tests: remove some direct access to .git/logs t/t7509: remove unnecessary manipulation of reflog
| * | | tests: remove some direct access to .git/logsDavid Turner2015-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternate refs backends might store reflogs somewhere other than .git/logs. Change most test code that directly accesses .git/logs to instead use git reflog commands. There are still a few tests which need direct access to reflogs: to check reflog permissions, to manually create reflogs from scratch, to save/restore reflogs, to check the format of raw reflog data, and to remove not just reflog contents, but the reflogs themselves. All cases which don't need direct access have been modified. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'ph/rebase-i-redo' into maintJunio C Hamano2015-06-05
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git rebase -i" moved the "current" command from "todo" to "done" a bit too prematurely, losing a step when a "pick" did not even start. * ph/rebase-i-redo: rebase -i: redo tasks that die during cherry-pick
* | \ \ \ Merge branch 'gr/rebase-i-drop-warn'Junio C Hamano2015-08-03
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "drop commit-object-name subject" command as another way to skip replaying of a commit in "rebase -i", and then punish those who do not use it (and instead just remove the lines) by throwing a warning. * gr/rebase-i-drop-warn: git rebase -i: add static check for commands and SHA-1 git rebase -i: warn about removed commits git-rebase -i: add command "drop" to remove a commit
| * | | | git rebase -i: add static check for commands and SHA-1Galan Rémi2015-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check before the start of the rebasing if the commands exists, and for the commands expecting a SHA-1, check if the SHA-1 is present and corresponds to a commit. In case of error, print the error, stop git rebase and prompt the user to fix with 'git rebase --edit-todo' or to abort. This allows to avoid doing half of a rebase before finding an error and giving back what's left of the todo list to the user and prompt him to fix when it might be too late for him to do so (he might have to abort and restart the rebase). Signed-off-by: Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git rebase -i: warn about removed commitsGalan Rémi2015-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if commits were removed (i.e. a line was deleted) and print warnings or stop git rebase depending on the value of the configuration variable rebase.missingCommitsCheck. This patch gives the user the possibility to avoid silent loss of information (losing a commit through deleting the line in this case) if he wants. Add the configuration variable rebase.missingCommitsCheck. - When unset or set to "ignore", no checking is done. - When set to "warn", the commits are checked, warnings are displayed but git rebase still proceeds. - When set to "error", the commits are checked, warnings are displayed and the rebase is stopped. (The user can then use 'git rebase --edit-todo' and 'git rebase --continue', or 'git rebase --abort') rebase.missingCommitsCheck defaults to "ignore". Signed-off-by: Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-rebase -i: add command "drop" to remove a commitGalan Rémi2015-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of removing a line to remove the commit, you can use the command "drop" (just like "pick" or "edit"). It has the same effect as deleting the line (removing the commit) except that you keep a visual trace of your actions, allowing a better control and reducing the possibility of removing a commit by mistake. Signed-off-by: Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'js/rebase-i-clean-up-upon-continue-to-skip'Junio C Hamano2015-07-13
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abandoning an already applied change in "git rebase -i" with "--continue" left CHERRY_PICK_HEAD and confused later steps. * js/rebase-i-clean-up-upon-continue-to-skip: rebase -i: do not leave a CHERRY_PICK_HEAD file behind t3404: demonstrate CHERRY_PICK_HEAD bug
| * | | | rebase -i: do not leave a CHERRY_PICK_HEAD file behindJohannes Schindelin2015-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When skipping commits whose changes were already applied via `git rebase --continue`, we need to clean up said file explicitly. The same is not true for `git rebase --skip` because that will execute `git reset --hard` as part of the "skip" handling in git-rebase.sh, even before git-rebase--interactive.sh is called. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t3404: demonstrate CHERRY_PICK_HEAD bugJohannes Schindelin2015-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rev-list's --cherry option does not detect that a patch has already been applied upstream, an interactive rebase would offer to reapply it and consequently stop at that patch with a failure, mentioning that the diff is empty. Traditionally, a `git rebase --continue` simply skips the commit in such a situation. However, as pointed out by Gábor Szeder, this leaves a CHERRY_PICK_HEAD behind, making the Git prompt believe that a cherry pick is still going on. This commit adds a test case demonstrating this bug. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ph/rebase-i-redo'Junio C Hamano2015-05-19
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| | | | | | | | | | | | | | "git rebase -i" moved the "current" command from "todo" to "done" a bit too prematurely, losing a step when a "pick" did not even start. * ph/rebase-i-redo: rebase -i: redo tasks that die during cherry-pick
| * | | rebase -i: redo tasks that die during cherry-pickPhil Hord2015-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rebase--interactive processes a task, it removes the item from the todo list and appends it to another list of executed tasks. If a pick (this includes squash and fixup) fails before the index has recorded the changes, take the corresponding item and put it on the todo list again. Otherwise, the changes introduced by the scheduled commit would be lost. That kind of decision is possible since the cherry-pick command signals why it failed to apply the changes of the given commit. Either the changes are recorded in the index using a conflict (return value 1) and rebase does not continue until they are resolved or the changes are not recorded in the index (return value neither 0 nor 1) and rebase has to try again with the same task. Add a test cases for regression testing to the "rebase-interactive" test suite. Signed-off-by: Fabian Ruch <bafain@gmail.com> Signed-off-by: Phil Hord <hordp@cisco.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'es/rebase-i-count-todo' into maintJunio C Hamano2015-03-23
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git rebase -i" recently started to include the number of commits in the insn sheet to be processed, but on a platform that prepends leading whitespaces to "wc -l" output, the numbers are shown with extra whitespaces that aren't necessary. * es/rebase-i-count-todo: rebase-interactive: re-word "item count" comment rebase-interactive: suppress whitespace preceding item count
* | | | | t: fix trivial &&-chain breakageJeff King2015-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are tests which are missing a link in their &&-chain, but during a setup phase. We may fail to notice failure in commands that build the test environment, but these are typically not expected to fail at all (but it's still good to double-check that our test environment is what we expect). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | t: fix moderate &&-chain breakageJeff King2015-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are tests which are missing a link in their &&-chain, but in a way that probably does not effect the outcome of the test. Most of these are of the form: some_cmd >actual test_cmp expect actual The main point of the test is to verify the output, and a failure in some_cmd would probably be noticed by bogus output. But it is good for the tests to also confirm that "some_cmd" does not die unexpectedly after producing its output. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'es/rebase-i-count-todo'Junio C Hamano2015-03-17
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git rebase -i" recently started to include the number of commits in the insn sheet to be processed, but on a platform that prepends leading whitespaces to "wc -l" output, the numbers are shown with extra whitespaces that aren't necessary. * es/rebase-i-count-todo: rebase-interactive: re-word "item count" comment rebase-interactive: suppress whitespace preceding item count
| * | | rebase-interactive: suppress whitespace preceding item countEric Sunshine2015-03-06
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10) taught rebase-interactive to compute an item count with 'wc -l' and display it in the instruction list comments: # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s)) On Mac OS X, however, it renders as: # Rebase 46640c6..5568fd5 onto 46640c6 ( 4 TODO item(s)) since 'wc -l' indents its output with leading spaces. Fix this. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>