-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for move to parent in main view
We also handle unstaged changes correctly now. [ jf: move to separate function and add test. ] Fixes #388
- Loading branch information
Showing
3 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#!/bin/sh | ||
|
||
. libtest.sh | ||
. libgit.sh | ||
. "$source_dir/util.sh" | ||
|
||
export LINES=10 | ||
|
||
steps ' | ||
:save-display commit-1.screen | ||
:parent | ||
:save-display commit-2.screen | ||
:parent | ||
:save-display commit-5.screen | ||
:parent | ||
:save-display commit-5-still.screen | ||
:3 | ||
:save-display unstaged-changes.screen | ||
:parent | ||
:save-display commit-3.screen | ||
' | ||
|
||
tigrc <<EOF | ||
set line-graphics = ascii | ||
EOF | ||
|
||
in_work_dir create_repo_from_tgz "$base_dir/files/scala-js-benchmarks.tgz" | ||
in_work_dir setup-conflict.sh > repo.log 2>&1 | ||
|
||
test_tig --merge | ||
|
||
assert_equals 'commit-1.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] 9d2a1bbf0046ec6b5e7a6faebb9ba9374bdbdee7 - commit 1 of 5 100% | ||
EOF | ||
|
||
assert_equals 'commit-2.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] fa878e5e6d838243fa59025ef314395fbebc790f - commit 2 of 5 100% | ||
EOF | ||
|
||
assert_equals 'commit-5.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] 74e56ba07b2ab229b9da9f87f586e880c1300854 - commit 5 of 5 100% | ||
EOF | ||
|
||
assert_equals 'commit-5-still.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] 74e56ba07b2ab229b9da9f87f586e880c1300854 - commit 5 of 5 100% | ||
EOF | ||
|
||
assert_equals 'unstaged-changes.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] Unstaged changes 100% | ||
EOF | ||
|
||
assert_equals 'commit-3.screen' <<EOF | ||
2009-03-28 13:22 Committer * [conflict-branch] Change: d' | ||
2009-03-20 01:00 Committer * Change: d | ||
$YYY_MM_DD_HH_MM Unknown | * Unstaged changes | ||
2009-03-11 12:38 Committer | * [conflict-master] Change: c' | ||
2009-03-03 00:15 Committer | * Change: c | ||
2009-02-22 11:53 Committer o-' [master] Change: b | ||
[main] 42f17bb0393458bc27b5f512022aabb15d3935fd - commit 3 of 5 100% | ||
EOF |