summaryrefslogtreecommitdiff
path: root/t/t3411-rebase-preserve-around-merges.sh
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'js/rebase-i-p-test-fix'Junio C Hamano2012-05-231-0/+1
|\ | | | | | | | | | | By Johannes Sixt * js/rebase-i-p-test-fix: Fix t3411.3 to actually rebase something
| * Fix t3411.3 to actually rebase somethingJohannes Sixt2012-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | The test intends to rebase a branchy history onto a later commit, but it forgot to reset HEAD back to an earlier commit before it set up the side branches. In the end, every "rebased" commit was only a fast-forward and the 'rebase -p' did not change the commit graph at all. Insert the missing checkout that moves to an earlier commit. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rebase -i -p: include non-first-parent commits in todo listAndrew Wong2011-06-191-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this graph: D---E (topic, HEAD) / / A---B---C (master) \ F (topic2) and the following three commands: 1. git rebase -i -p A 2. git rebase -i -p --onto F A 3. git rebase -i -p B Currently, (1) and (2) will pick B, D, C, and E onto A and F, respectively. However, (3) will only pick D and E onto B, but not C, which is inconsistent with (1) and (2). As a result, we cannot modify C during the interactive-rebase. The current behavior also creates a bug if we do: 4. git rebase -i -p C In (4), E is never picked. And since interactive-rebase resets "HEAD" to "onto" before picking any commits, D and E are lost after the interactive-rebase. This patch fixes the inconsistency and bug by ensuring that all children of upstream are always picked. This essentially reverts the commit: d80d6bc146232d81f1bb4bc58e5d89263fd228d4 When compiling the todo list, commits reachable from "upstream" should never be skipped under any conditions. Otherwise, we lose the ability to modify them like (3), and create a bug like (4). Two of the tests contain a scenario like (3). Since the new behavior added more commits for picking, these tests need to be updated to account for the additional pick lines. A new test has also been added for (4). Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: use "$TEST_DIRECTORY" instead of ".."Jeff King2009-08-091-1/+1
| | | | | | | | | | | | | | The $TEST_DIRECTORY variable allows tests to find the top-level test directory regardless of the current working directory. In the past, this has been used to accomodate tests which change directories, but it is also the first step to being able to move trash directories outside of the $TEST_DIRECTORY hierarchy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Simplify t3411Johannes Schindelin2009-01-281-48/+17
| | | | | | | | Use test_commit() and test_merge(). This way, it is harder to forget to tag, or to call test_tick before committing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t3404 & t3411: undo copy&pasteJohannes Schindelin2009-01-281-34/+4
| | | | | | | | Rather than copying and pasting, which is prone to lead to fixes missing in one version, move the fake-editor generator to t/t3404/. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make t3411 executableMiklos Vajna2009-01-141-0/+0
| | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase-i-p: if todo was reordered use HEAD as the rewritten parentStephen Haberman2008-10-161-2/+2
| | | | | | | | | | This seems like the best guess we can make until git sequencer marks are available. That being said, within the context of re-ordering a commit before its parent in todo, I think applying it on top of the current commit seems like a reasonable assumption of what the user intended. Signed-off-by: Stephen Haberman <stephen@exigencecorp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase-i-p: test to exclude commits from todo based on its parentsStephen Haberman2008-10-161-0/+135
The first case was based off a script from Avi Kivity <avi@redhat.com>. The second case includes a merge-of-a-merge to ensure both are included in todo. Signed-off-by: Stephen Haberman <stephen@exigencecorp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>