mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-28 09:08:41 +02:00
add branch rebase integration test
This commit is contained in:
parent
843488bff4
commit
7b757d1cfe
@ -13,7 +13,7 @@ Usage:
|
||||
See https://github.com/jesseduffield/lazygit/tree/master/pkg/integration/README.md
|
||||
|
||||
CLI mode:
|
||||
> go run cmd/integration_test/main.go cli [--slow] <test1> <test2> ...
|
||||
> go run cmd/integration_test/main.go cli [--slow] [--sandbox] <test1> <test2> ...
|
||||
If you pass no test names, it runs all tests
|
||||
Accepted environment variables:
|
||||
KEY_PRESS_DELAY (e.g. 200): the number of milliseconds to wait between keypresses
|
||||
@ -42,12 +42,19 @@ func main() {
|
||||
case "cli":
|
||||
testNames := os.Args[2:]
|
||||
slow := false
|
||||
sandbox := false
|
||||
// get the next arg if it's --slow
|
||||
if len(os.Args) > 2 && (os.Args[2] == "--slow" || os.Args[2] == "-slow") {
|
||||
testNames = os.Args[3:]
|
||||
slow = true
|
||||
if len(os.Args) > 2 {
|
||||
if os.Args[2] == "--slow" || os.Args[2] == "-slow" {
|
||||
testNames = os.Args[3:]
|
||||
slow = true
|
||||
} else if os.Args[2] == "--sandbox" || os.Args[2] == "-sandbox" {
|
||||
testNames = os.Args[3:]
|
||||
sandbox = true
|
||||
}
|
||||
}
|
||||
clients.RunCLI(testNames, slow)
|
||||
|
||||
clients.RunCLI(testNames, slow, sandbox)
|
||||
case "tui":
|
||||
clients.RunTUI()
|
||||
default:
|
||||
|
@ -11,7 +11,7 @@ go run cmd/integration_test/main.go tui
|
||||
or
|
||||
|
||||
```sh
|
||||
go run cmd/integration_test/main.go cli [--slow] [testname or testpath...]
|
||||
go run cmd/integration_test/main.go cli [--slow or --sandbox] [testname or testpath...]
|
||||
```
|
||||
|
||||
## Writing tests
|
||||
@ -49,7 +49,7 @@ If you find yourself doing something frequently in a test, consider making it a
|
||||
|
||||
There are three ways to invoke a test:
|
||||
|
||||
1. go run cmd/integration_test/main.go cli [--slow] [testname or testpath...]
|
||||
1. go run cmd/integration_test/main.go cli [--slow or --sandbox] [testname or testpath...]
|
||||
2. go run cmd/integration_test/main.go tui
|
||||
3. go test pkg/integration/clients/go_test.go
|
||||
|
||||
@ -69,7 +69,7 @@ At the moment (this is subject to change) each test has a snapshot repo created
|
||||
|
||||
Say you want to do a manual test of how lazygit handles merge-conflicts, but you can't be bothered actually finding a way to create merge conflicts in a repo. To make your life easier, you can simply run a merge-conflicts test in sandbox mode, meaning the setup step is run for you, and then instead of the test driving the lazygit session, you're allowed to drive it yourself.
|
||||
|
||||
To run a test in sandbox mode you can press 's' on a test in the test TUI or pass the env var MODE=sandbox to the test runner.
|
||||
To run a test in sandbox mode you can press 's' on a test in the test TUI or in the test runner pass MODE=sandbox or the --sandbox argument.
|
||||
|
||||
## Migration process
|
||||
|
||||
|
@ -23,18 +23,25 @@ import (
|
||||
|
||||
// If invoked directly, you can specify tests to run by passing their names as positional arguments
|
||||
|
||||
func RunCLI(testNames []string, slow bool) {
|
||||
func RunCLI(testNames []string, slow bool, sandbox bool) {
|
||||
keyPressDelay := tryConvert(os.Getenv("KEY_PRESS_DELAY"), 0)
|
||||
if slow {
|
||||
keyPressDelay = SLOW_KEY_PRESS_DELAY
|
||||
}
|
||||
|
||||
var mode components.Mode
|
||||
if sandbox {
|
||||
mode = components.SANDBOX
|
||||
} else {
|
||||
mode = getModeFromEnv()
|
||||
}
|
||||
|
||||
err := components.RunTests(
|
||||
getTestsToRun(testNames),
|
||||
log.Printf,
|
||||
runCmdInTerminal,
|
||||
runAndPrintFatalError,
|
||||
getModeFromEnv(),
|
||||
mode,
|
||||
keyPressDelay,
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -40,6 +40,15 @@ func (s *Shell) CreateFile(path string, content string) *Shell {
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Shell) UpdateFile(path string, content string) *Shell {
|
||||
err := ioutil.WriteFile(path, []byte(content), 0o644)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("error updating file: %s\n%s", path, err))
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *Shell) NewBranch(name string) *Shell {
|
||||
return s.RunCommand("git checkout -b " + name)
|
||||
}
|
||||
@ -71,6 +80,13 @@ func (s *Shell) CreateFileAndAdd(fileName string, fileContents string) *Shell {
|
||||
GitAdd(fileName)
|
||||
}
|
||||
|
||||
// convenience method for updating a file and adding it
|
||||
func (s *Shell) UpdateFileAndAdd(fileName string, fileContents string) *Shell {
|
||||
return s.
|
||||
UpdateFile(fileName, fileContents).
|
||||
GitAdd(fileName)
|
||||
}
|
||||
|
||||
// creates commits 01, 02, 03, ..., n with a new file in each
|
||||
// The reason for padding with zeroes is so that it's easier to do string
|
||||
// matches on the commit messages when there are many of them
|
||||
|
94
pkg/integration/tests/branch/rebase.go
Normal file
94
pkg/integration/tests/branch/rebase.go
Normal file
@ -0,0 +1,94 @@
|
||||
package branch
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var originalFileContent = `
|
||||
This
|
||||
Is
|
||||
The
|
||||
Original
|
||||
File
|
||||
`
|
||||
|
||||
var firstChangeFileContent = `
|
||||
This
|
||||
Is
|
||||
The
|
||||
First Change
|
||||
File
|
||||
`
|
||||
|
||||
var secondChangeFileContent = `
|
||||
This
|
||||
Is
|
||||
The
|
||||
Second Change
|
||||
File
|
||||
`
|
||||
|
||||
// prepares us for a rebase that has conflicts
|
||||
var commonRebaseSetup = func(shell *Shell) {
|
||||
shell.
|
||||
NewBranch("original-branch").
|
||||
EmptyCommit("one").
|
||||
EmptyCommit("two").
|
||||
EmptyCommit("three").
|
||||
CreateFileAndAdd("file", originalFileContent).
|
||||
Commit("original").
|
||||
NewBranch("first-change-branch").
|
||||
UpdateFileAndAdd("file", firstChangeFileContent).
|
||||
Commit("first change").
|
||||
Checkout("original-branch").
|
||||
NewBranch("second-change-branch").
|
||||
UpdateFileAndAdd("file", secondChangeFileContent).
|
||||
Commit("second change").
|
||||
EmptyCommit("second-change-branch unrelated change").
|
||||
Checkout("first-change-branch")
|
||||
}
|
||||
|
||||
var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts.",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
commonRebaseSetup(shell)
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
input.SwitchToBranchesWindow()
|
||||
assert.CurrentViewName("localBranches")
|
||||
|
||||
assert.MatchSelectedLine(Contains("first-change-branch"))
|
||||
input.NextItem()
|
||||
assert.MatchSelectedLine(Contains("second-change-branch"))
|
||||
input.PressKeys(keys.Branches.RebaseBranch)
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' onto 'second-change-branch'?"))
|
||||
input.Confirm()
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("Conflicts!"))
|
||||
input.Confirm()
|
||||
|
||||
assert.CurrentViewName("files")
|
||||
assert.MatchSelectedLine(Contains("file"))
|
||||
|
||||
// not using Confirm() convenience method because I suspect we might change this
|
||||
// keybinding to something more bespoke
|
||||
input.PressKeys(keys.Universal.Confirm)
|
||||
|
||||
assert.CurrentViewName("mergeConflicts")
|
||||
input.PrimaryAction()
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
|
||||
input.Confirm()
|
||||
|
||||
// this proves we actually have integrated the changes from second-change-branch
|
||||
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
|
||||
},
|
||||
})
|
63
pkg/integration/tests/branch/rebase_and_drop.go
Normal file
63
pkg/integration/tests/branch/rebase_and_drop.go
Normal file
@ -0,0 +1,63 @@
|
||||
package branch
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts. Also mark a commit to be dropped before continuing.",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
commonRebaseSetup(shell)
|
||||
// addin a couple additional commits so that we can drop one
|
||||
shell.EmptyCommit("to drop")
|
||||
shell.EmptyCommit("to keep")
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
input.SwitchToBranchesWindow()
|
||||
assert.CurrentViewName("localBranches")
|
||||
|
||||
assert.MatchSelectedLine(Contains("first-change-branch"))
|
||||
input.NextItem()
|
||||
assert.MatchSelectedLine(Contains("second-change-branch"))
|
||||
input.PressKeys(keys.Branches.RebaseBranch)
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("Are you sure you want to rebase 'first-change-branch' onto 'second-change-branch'?"))
|
||||
input.Confirm()
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("Conflicts!"))
|
||||
input.Confirm()
|
||||
|
||||
assert.CurrentViewName("files")
|
||||
assert.MatchSelectedLine(Contains("file"))
|
||||
|
||||
input.SwitchToCommitsWindow()
|
||||
input.NextItem()
|
||||
input.PressKeys(keys.Universal.Remove)
|
||||
assert.MatchSelectedLine(Contains("to drop"))
|
||||
assert.MatchSelectedLine(Contains("drop"))
|
||||
|
||||
input.SwitchToFilesWindow()
|
||||
|
||||
// not using Confirm() convenience method because I suspect we might change this
|
||||
// keybinding to something more bespoke
|
||||
input.PressKeys(keys.Universal.Confirm)
|
||||
|
||||
assert.CurrentViewName("mergeConflicts")
|
||||
input.PrimaryAction()
|
||||
|
||||
assert.InConfirm()
|
||||
assert.MatchCurrentViewContent(Contains("all merge conflicts resolved. Continue?"))
|
||||
input.Confirm()
|
||||
|
||||
// this proves we actually have integrated the changes from second-change-branch
|
||||
assert.MatchViewContent("commits", Contains("second-change-branch unrelated change"))
|
||||
assert.MatchViewContent("commits", Contains("to keep"))
|
||||
assert.MatchViewContent("commits", NotContains("to drop"))
|
||||
},
|
||||
})
|
@ -25,6 +25,8 @@ var tests = []*components.IntegrationTest{
|
||||
commit.NewBranch,
|
||||
branch.Suggestions,
|
||||
branch.Delete,
|
||||
branch.Rebase,
|
||||
branch.RebaseAndDrop,
|
||||
interactive_rebase.One,
|
||||
custom_commands.Basic,
|
||||
custom_commands.MultiplePrompts,
|
||||
|
@ -1,18 +0,0 @@
|
||||
first commit on master
|
||||
|
||||
# Please enter the commit message for your changes. Lines starting
|
||||
# with '#' will be ignored, and an empty message aborts the commit.
|
||||
#
|
||||
# interactive rebase in progress; onto e957aaf
|
||||
# Last command done (1 command done):
|
||||
# pick 69f11ae first commit on master
|
||||
# Next commands to do (3 remaining commands):
|
||||
# drop 8d3bd1c second commit on master
|
||||
# drop 3e1706c third commit on master
|
||||
# You are currently rebasing branch 'master' on 'e957aaf'.
|
||||
#
|
||||
# Changes to be committed:
|
||||
# modified: directory/file
|
||||
# modified: directory/file2
|
||||
# modified: file1
|
||||
#
|
@ -1 +0,0 @@
|
||||
ref: refs/heads/master
|
@ -1 +0,0 @@
|
||||
69f11ae88c8712fe38ffd0fe9ff9df05371500a6
|
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
0000000000000000000000000000000000000000 3627f93f3cc779dc2f99484fb8ffa49953e43b2f CI <CI@example.com> 1643188754 +1100 commit (initial): first commit
|
||||
3627f93f3cc779dc2f99484fb8ffa49953e43b2f 3627f93f3cc779dc2f99484fb8ffa49953e43b2f CI <CI@example.com> 1643188754 +1100 checkout: moving from master to develop
|
||||
3627f93f3cc779dc2f99484fb8ffa49953e43b2f 9a6521a3788b4d9e679b1709130ff8dc3f73ab18 CI <CI@example.com> 1643188754 +1100 commit: first commit on develop
|
||||
9a6521a3788b4d9e679b1709130ff8dc3f73ab18 3627f93f3cc779dc2f99484fb8ffa49953e43b2f CI <CI@example.com> 1643188754 +1100 checkout: moving from develop to master
|
||||
3627f93f3cc779dc2f99484fb8ffa49953e43b2f 69f11ae88c8712fe38ffd0fe9ff9df05371500a6 CI <CI@example.com> 1643188754 +1100 commit: first commit on master
|
||||
69f11ae88c8712fe38ffd0fe9ff9df05371500a6 9a6521a3788b4d9e679b1709130ff8dc3f73ab18 CI <CI@example.com> 1643188754 +1100 checkout: moving from master to develop
|
||||
9a6521a3788b4d9e679b1709130ff8dc3f73ab18 a8381c9130b03aef530b60b5a4546b93dc59ae12 CI <CI@example.com> 1643188754 +1100 commit: second commit on develop
|
||||
a8381c9130b03aef530b60b5a4546b93dc59ae12 69f11ae88c8712fe38ffd0fe9ff9df05371500a6 CI <CI@example.com> 1643188754 +1100 checkout: moving from develop to master
|
||||
69f11ae88c8712fe38ffd0fe9ff9df05371500a6 8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 CI <CI@example.com> 1643188754 +1100 commit: second commit on master
|
||||
8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 a8381c9130b03aef530b60b5a4546b93dc59ae12 CI <CI@example.com> 1643188754 +1100 checkout: moving from master to develop
|
||||
a8381c9130b03aef530b60b5a4546b93dc59ae12 7095508e3cd0fd40572f8e711170db38ef2342d7 CI <CI@example.com> 1643188754 +1100 commit: third commit on develop
|
||||
7095508e3cd0fd40572f8e711170db38ef2342d7 8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 CI <CI@example.com> 1643188754 +1100 checkout: moving from develop to master
|
||||
8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 3e1706cdf670f5641be0715178471abfc9ed1748 CI <CI@example.com> 1643188754 +1100 commit: third commit on master
|
||||
3e1706cdf670f5641be0715178471abfc9ed1748 7095508e3cd0fd40572f8e711170db38ef2342d7 CI <CI@example.com> 1643188754 +1100 checkout: moving from master to develop
|
||||
7095508e3cd0fd40572f8e711170db38ef2342d7 e957aaf2eef0c03a9052b472d4862d9ee684c3e5 CI <CI@example.com> 1643188754 +1100 commit: fourth commit on develop
|
||||
e957aaf2eef0c03a9052b472d4862d9ee684c3e5 3e1706cdf670f5641be0715178471abfc9ed1748 CI <CI@example.com> 1643188754 +1100 checkout: moving from develop to master
|
||||
3e1706cdf670f5641be0715178471abfc9ed1748 f5067da83b48f8588edce682fd2715a575f34373 CI <CI@example.com> 1643188754 +1100 commit: fourth commit on master
|
||||
f5067da83b48f8588edce682fd2715a575f34373 e957aaf2eef0c03a9052b472d4862d9ee684c3e5 CI <CI@example.com> 1643188756 +1100 rebase -i (start): checkout develop
|
||||
e957aaf2eef0c03a9052b472d4862d9ee684c3e5 f5067da83b48f8588edce682fd2715a575f34373 CI <CI@example.com> 1643188757 +1100 rebase -i (abort): updating HEAD
|
||||
f5067da83b48f8588edce682fd2715a575f34373 e957aaf2eef0c03a9052b472d4862d9ee684c3e5 CI <CI@example.com> 1643188758 +1100 rebase -i (start): checkout develop
|
||||
e957aaf2eef0c03a9052b472d4862d9ee684c3e5 42597904331c82f6d5c8c902755c8dfa5767ea95 CI <CI@example.com> 1643188766 +1100 rebase -i (continue): first commit on master
|
||||
42597904331c82f6d5c8c902755c8dfa5767ea95 42597904331c82f6d5c8c902755c8dfa5767ea95 CI <CI@example.com> 1643188766 +1100 rebase -i (finish): returning to refs/heads/master
|
@ -1,5 +0,0 @@
|
||||
0000000000000000000000000000000000000000 3627f93f3cc779dc2f99484fb8ffa49953e43b2f CI <CI@example.com> 1643188754 +1100 branch: Created from HEAD
|
||||
3627f93f3cc779dc2f99484fb8ffa49953e43b2f 9a6521a3788b4d9e679b1709130ff8dc3f73ab18 CI <CI@example.com> 1643188754 +1100 commit: first commit on develop
|
||||
9a6521a3788b4d9e679b1709130ff8dc3f73ab18 a8381c9130b03aef530b60b5a4546b93dc59ae12 CI <CI@example.com> 1643188754 +1100 commit: second commit on develop
|
||||
a8381c9130b03aef530b60b5a4546b93dc59ae12 7095508e3cd0fd40572f8e711170db38ef2342d7 CI <CI@example.com> 1643188754 +1100 commit: third commit on develop
|
||||
7095508e3cd0fd40572f8e711170db38ef2342d7 e957aaf2eef0c03a9052b472d4862d9ee684c3e5 CI <CI@example.com> 1643188754 +1100 commit: fourth commit on develop
|
@ -1,6 +0,0 @@
|
||||
0000000000000000000000000000000000000000 3627f93f3cc779dc2f99484fb8ffa49953e43b2f CI <CI@example.com> 1643188754 +1100 commit (initial): first commit
|
||||
3627f93f3cc779dc2f99484fb8ffa49953e43b2f 69f11ae88c8712fe38ffd0fe9ff9df05371500a6 CI <CI@example.com> 1643188754 +1100 commit: first commit on master
|
||||
69f11ae88c8712fe38ffd0fe9ff9df05371500a6 8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 CI <CI@example.com> 1643188754 +1100 commit: second commit on master
|
||||
8d3bd1cbd5560c759c78a948bc0d24acb9cfae73 3e1706cdf670f5641be0715178471abfc9ed1748 CI <CI@example.com> 1643188754 +1100 commit: third commit on master
|
||||
3e1706cdf670f5641be0715178471abfc9ed1748 f5067da83b48f8588edce682fd2715a575f34373 CI <CI@example.com> 1643188754 +1100 commit: fourth commit on master
|
||||
f5067da83b48f8588edce682fd2715a575f34373 42597904331c82f6d5c8c902755c8dfa5767ea95 CI <CI@example.com> 1643188766 +1100 rebase -i (finish): refs/heads/master onto e957aaf2eef0c03a9052b472d4862d9ee684c3e5
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x�ÎA
|
||||
Â0…a×9ÅìIšI2¡«c’LiÁ˜R#x|^ÀíãÿàåVëÚaÐñÔwL žƒÓ6ZòÞPû˜ÒÌHV�gµñ.ÏTl*&§âœ×9¸˜‘RÖe@Î)æ™%XÅï¾´Æ ®ãt—×í!—Üê
ŒGkˆ‚C8£µ:ÖãT—?sÕ—u/ðSОPùu`õ.°?í
|
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
xå�Ñ €0CývŠLÐÅ\ãj�VО´WÄí=Àü�„äãùM<†iìf.Œµ‚PUÊM¤HTá™3T¶`Q‘–¢9ƒ"×^òÂh‡d[éºóÓØËi+B�Ø;ç~¥/ Y:/–¸<PÃ
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x��M
|
||||
Β0F]η³d¦ΝΟD„®z�$�AΑ4¥�ΰρ-x—ίγ=ψr-εΩ #<µMpΘI8ϋ@!£��8ψ’·ν1»¤}vμf³ΖM–~PΆ(Μ™u*=«Ξ¨2¨³Άλ9ΔθM|·Gέ`�ΰ:NwωΔ²Ύδ’kΉyΫspΞD�ζ Η©&κf—\—~ΤJά�Ϊ|µB@t
|
@ -1,3 +0,0 @@
|
||||
x��K
|
||||
Â0@]糤ù´“¡«#“Î`¡mJ�âñ-x·�÷àå²,Sg›SİE@%8äÖ1³Ğ˜r´:ŸlçÔcbBÊ Ñ±ÙÒ.kß9TòêsF¤1;%
|
||||
1(GÕˆZ/Á³S“^õQvè¸öÃ]>iÙf¹ä²ÜÀvÁÛ±
p¶¶iÌA�©*êF§ıYáWAYa”·Ìe3_-MA"
|
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x�ŽË
|
||||
Â0E]ç+f/H&“ÇD„®úyLQ°M©Qü|þ€pW‡sà–6Ï÷ñÐ7ɺ̑ˆ4‹¥É¸D\5Q³7i_ÌÖgRkÚdé“wælkbÆ #’ž&®…¦@)#«ôê·¶Á0Ây¯òIóú�SióÐ[Bæà,µV;ÝOuùSWO)m©ðË -På-�¶ª/8|?¼
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
xĺ�Q
|
||||
Â@DýŢSĚ
|
||||
,*
|
||||
˝FÚ¦íBw#»)âíM©ßRż�d��×LŇŕPíw5'†Ď d•ô‚Ž¤)ŁaŽP™:;%™ÇÁ6�Îî´
|
||||
őýzs[Ćü�hę/6‹|Zˇ“ÁťW}7¶¤î˛
|
||||
Ő±/Kâ˘(Đű”„ŕV(+'gŻżšÍŔŁ,ô7c˙Ř�˙Ę0Ť1
|
@ -1 +0,0 @@
|
||||
xĺ�Ń €0Cýî™ ?Š3¸ĆµV¨=iOÄí=Ŕü�„äă…,ý8tWĆÚ@h*ő‚&R$jĚ*y¶¨Ę‘s-Üś”Č8v)¶Ňu㧱—ÓV„HęĽ÷żŇ�"ťË
µćPż
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
x�ŽA
|
||||
Â0E]ç³$c“L
|
||||
"BW=FšÌPÁ4%¦àñ
x·ÿ½?–œŸ
®¨O2Ã`"tÈ,£óG‹Q�tЈ|X„SZbR{¨¼5¸C“8Òb�Á…5¡Eò†°Ûqä„d¼
|
||||
G[K…i†Û4?øòþâK,ùèÌ€Þ“5pFÔZõµŸjü§®¤µðË l�û×ê1A
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
e957aaf2eef0c03a9052b472d4862d9ee684c3e5
|
@ -1 +0,0 @@
|
||||
42597904331c82f6d5c8c902755c8dfa5767ea95
|
@ -1 +0,0 @@
|
||||
test3
|
@ -1 +0,0 @@
|
||||
test3
|
@ -1,63 +0,0 @@
|
||||
Here is a story that has been told throuhg the ages
|
||||
once upon a time there was a cat
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
once upon a time there was another dog
|
@ -1 +0,0 @@
|
||||
once upon a time there was a mouse
|
@ -1 +0,0 @@
|
||||
once upon a time there was a mouse
|
@ -1 +0,0 @@
|
||||
once upon a time there was a mouse
|
@ -1 +0,0 @@
|
||||
{"KeyEvents":[{"Timestamp":617,"Mod":0,"Key":259,"Ch":0},{"Timestamp":922,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1176,"Mod":0,"Key":256,"Ch":114},{"Timestamp":1512,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2797,"Mod":0,"Key":27,"Ch":0},{"Timestamp":3632,"Mod":0,"Key":256,"Ch":114},{"Timestamp":4032,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4760,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5105,"Mod":0,"Key":259,"Ch":0},{"Timestamp":5376,"Mod":0,"Key":259,"Ch":0},{"Timestamp":5721,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5992,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6186,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6401,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6592,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6840,"Mod":0,"Key":260,"Ch":0},{"Timestamp":7105,"Mod":0,"Key":260,"Ch":0},{"Timestamp":7612,"Mod":0,"Key":256,"Ch":32},{"Timestamp":7922,"Mod":0,"Key":258,"Ch":0},{"Timestamp":8160,"Mod":0,"Key":256,"Ch":32},{"Timestamp":8680,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9080,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9464,"Mod":0,"Key":256,"Ch":32},{"Timestamp":9808,"Mod":0,"Key":256,"Ch":32},{"Timestamp":10040,"Mod":0,"Key":257,"Ch":0},{"Timestamp":10372,"Mod":0,"Key":256,"Ch":32},{"Timestamp":11249,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12088,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
@ -1,85 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd $1
|
||||
|
||||
git init
|
||||
git config user.email "CI@example.com"
|
||||
git config user.name "CI"
|
||||
|
||||
|
||||
function add_spacing {
|
||||
for i in {1..60}
|
||||
do
|
||||
echo "..." >> $1
|
||||
done
|
||||
}
|
||||
|
||||
mkdir directory
|
||||
echo "test1" > directory/file
|
||||
echo "test1" > directory/file2
|
||||
|
||||
|
||||
echo "Here is a story that has been told throuhg the ages" >> file1
|
||||
|
||||
git add file1
|
||||
git add directory
|
||||
git commit -m "first commit"
|
||||
|
||||
git checkout -b develop
|
||||
echo "once upon a time there was a dog" >> file1
|
||||
add_spacing file1
|
||||
echo "once upon a time there was another dog" >> file1
|
||||
git add file1
|
||||
echo "test2" > directory/file
|
||||
echo "test2" > directory/file2
|
||||
git add directory
|
||||
git commit -m "first commit on develop"
|
||||
|
||||
|
||||
git checkout master
|
||||
echo "once upon a time there was a cat" >> file1
|
||||
add_spacing file1
|
||||
echo "once upon a time there was another cat" >> file1
|
||||
git add file1
|
||||
echo "test3" > directory/file
|
||||
echo "test3" > directory/file2
|
||||
git add directory
|
||||
git commit -m "first commit on master"
|
||||
|
||||
|
||||
git checkout develop
|
||||
echo "once upon a time there was a mouse" >> file3
|
||||
git add file3
|
||||
git commit -m "second commit on develop"
|
||||
|
||||
|
||||
git checkout master
|
||||
echo "once upon a time there was a horse" >> file3
|
||||
git add file3
|
||||
git commit -m "second commit on master"
|
||||
|
||||
|
||||
git checkout develop
|
||||
echo "once upon a time there was a mouse" >> file4
|
||||
git add file4
|
||||
git commit -m "third commit on develop"
|
||||
|
||||
|
||||
git checkout master
|
||||
echo "once upon a time there was a horse" >> file4
|
||||
git add file4
|
||||
git commit -m "third commit on master"
|
||||
|
||||
|
||||
git checkout develop
|
||||
echo "once upon a time there was a mouse" >> file5
|
||||
git add file5
|
||||
git commit -m "fourth commit on develop"
|
||||
|
||||
|
||||
git checkout master
|
||||
echo "once upon a time there was a horse" >> file5
|
||||
git add file5
|
||||
git commit -m "fourth commit on master"
|
@ -1 +0,0 @@
|
||||
{ "description": "In this test we fix some merge conflicts, ensuring that in the flat tree structure the conflicts are bubbled to the top, and that after resolving the conflicts your cursor stays on the same line, able to select the next conflicted file. We also switch to tree mode and ensure that works too.", "speed": 10 }
|
@ -0,0 +1 @@
|
||||
second-change-branch unrelated change
|
@ -0,0 +1 @@
|
||||
ref: refs/heads/first-change-branch
|
@ -0,0 +1,4 @@
|
||||
first change
|
||||
|
||||
# Conflicts:
|
||||
# file
|
@ -0,0 +1 @@
|
||||
f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2
|
@ -0,0 +1 @@
|
||||
f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2
|
@ -8,3 +8,5 @@
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
[commit]
|
||||
gpgSign = false
|
BIN
test/integration_new/branch/rebase/expected/repo/.git_keep/index
Normal file
BIN
test/integration_new/branch/rebase/expected/repo/.git_keep/index
Normal file
Binary file not shown.
@ -0,0 +1,13 @@
|
||||
0000000000000000000000000000000000000000 0227353d56e56df9e9f94559f90b86ce7aa1ca5c CI <CI@example.com> 1661164934 +1000 commit (initial): one
|
||||
0227353d56e56df9e9f94559f90b86ce7aa1ca5c d7149d98e6da25303f9a8cdff131da4b0723a412 CI <CI@example.com> 1661164934 +1000 commit: two
|
||||
d7149d98e6da25303f9a8cdff131da4b0723a412 4c66ef64d685d244db41efda29deffb381c46c3d CI <CI@example.com> 1661164934 +1000 commit: three
|
||||
4c66ef64d685d244db41efda29deffb381c46c3d b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 commit: original
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 checkout: moving from original-branch to first-change-branch
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 CI <CI@example.com> 1661164934 +1000 commit: first change
|
||||
f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 checkout: moving from first-change-branch to original-branch
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 checkout: moving from original-branch to second-change-branch
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 702b646c08ba47b2ac5729deed77188ef1647b4d CI <CI@example.com> 1661164934 +1000 commit: second change
|
||||
702b646c08ba47b2ac5729deed77188ef1647b4d 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 CI <CI@example.com> 1661164934 +1000 commit: second-change-branch unrelated change
|
||||
5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 CI <CI@example.com> 1661164934 +1000 checkout: moving from second-change-branch to first-change-branch
|
||||
f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 CI <CI@example.com> 1661164936 +1000 rebase (start): checkout second-change-branch
|
||||
5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 CI <CI@example.com> 1661164938 +1000 rebase (continue) (finish): returning to refs/heads/first-change-branch
|
@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 branch: Created from HEAD
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 CI <CI@example.com> 1661164934 +1000 commit: first change
|
||||
f42b6ab94e265acf87a9b3bf8cfa1105fcad57b2 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 CI <CI@example.com> 1661164938 +1000 rebase (continue) (finish): refs/heads/first-change-branch onto 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37
|
@ -0,0 +1,4 @@
|
||||
0000000000000000000000000000000000000000 0227353d56e56df9e9f94559f90b86ce7aa1ca5c CI <CI@example.com> 1661164934 +1000 commit (initial): one
|
||||
0227353d56e56df9e9f94559f90b86ce7aa1ca5c d7149d98e6da25303f9a8cdff131da4b0723a412 CI <CI@example.com> 1661164934 +1000 commit: two
|
||||
d7149d98e6da25303f9a8cdff131da4b0723a412 4c66ef64d685d244db41efda29deffb381c46c3d CI <CI@example.com> 1661164934 +1000 commit: three
|
||||
4c66ef64d685d244db41efda29deffb381c46c3d b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 commit: original
|
@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 b827df09781d0648f66cd9a01f0ec0ad5d412e10 CI <CI@example.com> 1661164934 +1000 branch: Created from HEAD
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10 702b646c08ba47b2ac5729deed77188ef1647b4d CI <CI@example.com> 1661164934 +1000 commit: second change
|
||||
702b646c08ba47b2ac5729deed77188ef1647b4d 5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37 CI <CI@example.com> 1661164934 +1000 commit: second-change-branch unrelated change
|
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
x�ЭA
|
||||
Т0Faз9Хь��г!ЁЋ#IџЂ`��П=BЗ�^iЕО:�њS_вќ0S_В!ЧФЦ4/aЖшCX2 �еЅ_Ж�Ц�nуєР?ея�въ�ФLФ4^�ЮТЬnЏћЄу wэЗ�q+\
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
x�ÎM
|
||||
Â0@a×9Åì™IÓL"BW=F~&V0M©<¾=‚ÛÇ·x©Õúì O}D�Ù•ÀŒQûâ]ë2ÚGW8Æ! ±W[Øeí�æ\г£ÃW¬MÙ¤ $y̆´ªðéKÛašá:Íwù†º½ä’Z½YKd�œ ÕQ�©.rõ–ÔÖi ëCÔ9`<ˆ
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37
|
@ -0,0 +1 @@
|
||||
b827df09781d0648f66cd9a01f0ec0ad5d412e10
|
@ -0,0 +1 @@
|
||||
5513fcfcb56cc5f1de7b6b3ded32a945e94f5e37
|
6
test/integration_new/branch/rebase/expected/repo/file
Normal file
6
test/integration_new/branch/rebase/expected/repo/file
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
This
|
||||
Is
|
||||
The
|
||||
Second Change
|
||||
File
|
@ -0,0 +1 @@
|
||||
to keep
|
@ -0,0 +1 @@
|
||||
ref: refs/heads/first-change-branch
|
@ -0,0 +1 @@
|
||||
39129f24587bdc648e1fdb6f0b089c0846f54d45
|
@ -0,0 +1,12 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
[commit]
|
||||
gpgSign = false
|
@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
.DS_Store
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user