1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-07 13:42:01 +02:00

Merge pull request #2437 from jesseduffield/migrate-even-more-tests

This commit is contained in:
Jesse Duffield 2023-02-12 18:16:22 +11:00 committed by GitHub
commit b66aa42ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
238 changed files with 378 additions and 542 deletions

View File

@ -307,6 +307,7 @@ func (self *app) layout(g *gocui.Gui) error {
}
listView.Highlight = true
listView.SelBgColor = gocui.ColorBlue
self.renderTests()
listView.Title = "Tests"
listView.FgColor = gocui.ColorDefault

View File

@ -83,7 +83,7 @@ func (self *matcher) MatchesRegexp(target string) *matcher {
if err != nil {
return false, fmt.Sprintf("Unexpected error parsing regular expression '%s': %s", target, err.Error())
}
return matched, fmt.Sprintf("Expected '%s' to match regular expression '%s'", value, target)
return matched, fmt.Sprintf("Expected '%s' to match regular expression /%s/", value, target)
},
})
}

View File

@ -32,7 +32,10 @@ func (self *PromptDriver) Type(value string) *PromptDriver {
}
func (self *PromptDriver) Clear() *PromptDriver {
panic("Clear method not yet implemented!")
// TODO: soft-code this
self.t.press("<c-u>")
return self
}
func (self *PromptDriver) Confirm() {

View File

@ -14,8 +14,9 @@ import (
// this is the integration runner for the new and improved integration interface
const (
TEST_NAME_ENV_VAR = "TEST_NAME"
SANDBOX_ENV_VAR = "SANDBOX"
TEST_NAME_ENV_VAR = "TEST_NAME"
SANDBOX_ENV_VAR = "SANDBOX"
GIT_CONFIG_GLOBAL_ENV_VAR = "GIT_CONFIG_GLOBAL"
)
func RunTests(
@ -82,7 +83,7 @@ func runTest(
logf("path: %s", paths.Root())
if err := prepareTestDir(test, paths); err != nil {
if err := prepareTestDir(test, paths, projectRootDir); err != nil {
return err
}
@ -102,6 +103,7 @@ func runTest(
func prepareTestDir(
test *IntegrationTest,
paths Paths,
rootDir string,
) error {
findOrCreateDir(paths.Root())
deleteAndRecreateEmptyDir(paths.Actual())
@ -111,7 +113,7 @@ func prepareTestDir(
return err
}
return createFixture(test, paths)
return createFixture(test, paths, rootDir)
}
func buildLazygit() error {
@ -125,28 +127,30 @@ func buildLazygit() error {
)).Run()
}
func createFixture(test *IntegrationTest, paths Paths) error {
func createFixture(test *IntegrationTest, paths Paths, rootDir string) error {
shell := NewShell(paths.ActualRepo(), func(errorMsg string) { panic(errorMsg) })
shell.RunCommand("git init -b master")
shell.RunCommand(`git config user.email "CI@example.com"`)
shell.RunCommand(`git config user.name "CI"`)
shell.RunCommand(`git config commit.gpgSign false`)
shell.RunCommand(`git config protocol.file.allow always`)
os.Setenv(GIT_CONFIG_GLOBAL_ENV_VAR, globalGitConfigPath(rootDir))
test.SetupRepo(shell)
return nil
}
func globalGitConfigPath(rootDir string) string {
return filepath.Join(rootDir, "test", "global_git_config")
}
func getLazygitCommand(test *IntegrationTest, paths Paths, rootDir string, sandbox bool, keyPressDelay int) (*exec.Cmd, error) {
osCommand := oscommands.NewDummyOSCommand()
templateConfigDir := filepath.Join(rootDir, "test", "default_test_config")
err := os.RemoveAll(paths.Config())
if err != nil {
return nil, err
}
templateConfigDir := filepath.Join(rootDir, "test", "default_test_config")
err = oscommands.CopyDir(templateConfigDir, paths.Config())
if err != nil {
return nil, err
@ -165,7 +169,7 @@ func getLazygitCommand(test *IntegrationTest, paths Paths, rootDir string, sandb
cmdObj.AddEnvVars(fmt.Sprintf("KEY_PRESS_DELAY=%d", keyPressDelay))
}
cmdObj.AddEnvVars("GIT_CONFIG_GLOBAL=/dev/null")
cmdObj.AddEnvVars(fmt.Sprintf("%s=%s", GIT_CONFIG_GLOBAL_ENV_VAR, globalGitConfigPath(rootDir)))
return cmdObj.GetCmd(), nil
}

View File

@ -5,6 +5,7 @@ import (
"strings"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)
type ViewDriver struct {
@ -104,32 +105,56 @@ func (self *ViewDriver) SelectedLineIdx(expected int) *ViewDriver {
return self
}
// focus the view (assumes the view is a side-view that can be focused via a keybinding)
// focus the view (assumes the view is a side-view)
func (self *ViewDriver) Focus() *ViewDriver {
// we can easily change focus by switching to the view's window, but this assumes that the desired view
// is at the top of that window. So for now we'll switch to the window then assert that the desired
// view is on top (i.e. that it's the current view).
// If we want to support other views e.g. the tags view, we'll need to add more logic here.
viewName := self.getView().Name()
// using a map rather than a slice because we might add other views which share a window index later
windowIndexMap := map[string]int{
"status": 0,
"files": 1,
"localBranches": 2,
"commits": 3,
"stash": 4,
type window struct {
name string
viewNames []string
}
windows := []window{
{name: "status", viewNames: []string{"status"}},
{name: "files", viewNames: []string{"files", "submodules"}},
{name: "branches", viewNames: []string{"localBranches", "remotes", "tags"}},
{name: "commits", viewNames: []string{"commits", "reflogCommits"}},
{name: "stash", viewNames: []string{"stash"}},
}
index, ok := windowIndexMap[viewName]
if !ok {
self.t.fail(fmt.Sprintf("Cannot focus view %s: Focus() method not implemented", viewName))
for windowIndex, window := range windows {
if lo.Contains(window.viewNames, viewName) {
tabIndex := lo.IndexOf(window.viewNames, viewName)
// jump to the desired window
self.t.press(self.t.keys.Universal.JumpToBlock[windowIndex])
// assert we're in the window before continuing
self.t.assertWithRetries(func() (bool, string) {
currentWindowName := self.t.gui.CurrentContext().GetWindowName()
// by convention the window is named after the first view in the window
return currentWindowName == window.name, fmt.Sprintf("Expected to be in window '%s', but was in '%s'", window.name, currentWindowName)
})
// switch to the desired tab
currentViewName := self.t.gui.CurrentContext().GetViewName()
currentViewTabIndex := lo.IndexOf(window.viewNames, currentViewName)
if tabIndex > currentViewTabIndex {
for i := 0; i < tabIndex-currentViewTabIndex; i++ {
self.t.press(self.t.keys.Universal.NextTab)
}
} else if tabIndex < currentViewTabIndex {
for i := 0; i < currentViewTabIndex-tabIndex; i++ {
self.t.press(self.t.keys.Universal.PrevTab)
}
}
// assert that we're now in the expected view
self.IsFocused()
return self
}
}
self.t.press(self.t.keys.Universal.JumpToBlock[index])
// assert that we land in the expected view
self.IsFocused()
self.t.fail(fmt.Sprintf("Cannot focus view %s: Focus() method not implemented", viewName))
return self
}

View File

@ -348,6 +348,7 @@ func (app *App) layout(g *gocui.Gui) error {
return err
}
listView.Highlight = true
listView.SelBgColor = gocui.ColorBlue
listView.Clear()
for _, test := range app.tests {
fmt.Fprintln(listView, test.Name)

View File

@ -0,0 +1,65 @@
package submodule
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Add = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Add a submodule",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("first commit")
shell.RunCommand("git clone --bare . ../other_repo")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Submodules().Focus().
Press(keys.Universal.New).
Tap(func() {
t.ExpectPopup().Prompt().
Title(Equals("new submodule URL:")).
Type("../other_repo").Confirm()
t.ExpectPopup().Prompt().
Title(Equals("new submodule name:")).
InitialText(Equals("other_repo")).
Clear().Type("my_submodule").Confirm()
t.ExpectPopup().Prompt().
Title(Equals("new submodule path:")).
InitialText(Equals("my_submodule")).
Clear().Type("my_submodule_path").Confirm()
}).
Lines(
Contains("my_submodule").IsSelected(),
)
t.Views().Main().TopLines(
Contains("Name: my_submodule"),
Contains("Path: my_submodule_path"),
Contains("Url: ../other_repo"),
)
t.Views().Files().Focus().
Lines(
Contains(".gitmodules").IsSelected(),
Contains("my_submodule_path (submodule)"),
).
Tap(func() {
t.Views().Main().Content(
Contains("[submodule \"my_submodule\"]").
Contains("path = my_submodule_path").
Contains("url = ../other_repo"),
)
}).
SelectNextItem().
Tap(func() {
t.Views().Main().Content(
Contains("Submodule my_submodule_path").
Contains("(new submodule)"),
)
})
},
})

View File

@ -0,0 +1,82 @@
package submodule
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Enter = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Enter a submodule, add a commit, and then stage the change in the parent repo",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(cfg *config.AppConfig) {
cfg.UserConfig.CustomCommands = []config.CustomCommand{
{
Key: "e",
Context: "files",
Command: "git commit --allow-empty -m \"empty commit\"",
},
}
},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("first commit")
shell.RunCommand("git clone --bare . ../other_repo")
shell.RunCommand("git submodule add ../other_repo my_submodule")
shell.GitAddAll()
shell.Commit("add submodule")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
assertInParentRepo := func() {
t.Views().Status().Content(Contains("repo"))
}
assertInSubmodule := func() {
t.Views().Status().Content(Contains("my_submodule"))
}
assertInParentRepo()
t.Views().Submodules().Focus().
Lines(
Contains("my_submodule").IsSelected(),
).
// enter the submodule
PressEnter()
assertInSubmodule()
t.Views().Files().IsFocused().
Press("e").
Tap(func() {
t.Views().Commits().Content(Contains("empty commit"))
}).
// return to the parent repo
PressEscape()
assertInParentRepo()
t.Views().Submodules().IsFocused()
// we see the new commit in the submodule is ready to be staged in the parent repo
t.Views().Main().Content(Contains("> empty commit"))
t.Views().Files().Focus().
Lines(
MatchesRegexp(` M.*my_submodule \(submodule\)`).IsSelected(),
).
Tap(func() {
// main view also shows the new commit when we're looking at the submodule within the files view
t.Views().Main().Content(Contains("> empty commit"))
}).
PressPrimaryAction().
Press(keys.Files.CommitChanges).
Tap(func() {
t.ExpectPopup().CommitMessagePanel().Type("submodule change").Confirm()
}).
IsEmpty()
t.Views().Submodules().Focus()
// we no longer report a new commit because we've committed it in the parent repo
t.Views().Main().Content(DoesNotContain("> empty commit"))
},
})

View File

@ -0,0 +1,46 @@
package submodule
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Remove = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Remove a submodule",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("first commit")
shell.RunCommand("git clone --bare . ../other_repo")
shell.RunCommand("git submodule add ../other_repo my_submodule")
shell.GitAddAll()
shell.Commit("add submodule")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().Submodules().Focus().
Lines(
Contains("my_submodule").IsSelected(),
).
Press(keys.Universal.Remove).
Tap(func() {
t.ExpectPopup().Confirmation().
Title(Equals("Remove submodule")).
Content(Equals("Are you sure you want to remove submodule 'my_submodule' and its corresponding directory? This is irreversible.")).
Confirm()
}).
IsEmpty()
t.Views().Files().Focus().
Lines(
MatchesRegexp(`M.*\.gitmodules`).IsSelected(),
MatchesRegexp(`D.*my_submodule`),
)
t.Views().Main().Content(
Contains("-[submodule \"my_submodule\"]").
Contains("- path = my_submodule").
Contains("- url = ../other_repo"),
)
},
})

View File

@ -0,0 +1,105 @@
package submodule
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Reset = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Enter a submodule, create a commit and stage some changes, then reset the submodule from back in the parent repo. This test captures functionality around getting a dirty submodule out of your files panel.",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(cfg *config.AppConfig) {
cfg.UserConfig.CustomCommands = []config.CustomCommand{
{
Key: "e",
Context: "files",
Command: "git commit --allow-empty -m \"empty commit\" && echo \"my_file content\" > my_file",
},
}
},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("first commit")
shell.RunCommand("git clone --bare . ../other_repo")
shell.RunCommand("git submodule add ../other_repo my_submodule")
shell.GitAddAll()
shell.Commit("add submodule")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
assertInParentRepo := func() {
t.Views().Status().Content(Contains("repo"))
}
assertInSubmodule := func() {
t.Views().Status().Content(Contains("my_submodule"))
}
assertInParentRepo()
t.Views().Submodules().Focus().
Lines(
Contains("my_submodule").IsSelected(),
).
// enter the submodule
PressEnter()
assertInSubmodule()
t.Views().Status().Content(Contains("my_submodule"))
t.Views().Files().IsFocused().
Press("e").
Tap(func() {
t.Views().Commits().Content(Contains("empty commit"))
t.Views().Files().Content(Contains("my_file"))
}).
Lines(
Contains("my_file").IsSelected(),
).
// stage my_file
PressPrimaryAction().
// return to the parent repo
PressEscape()
assertInParentRepo()
t.Views().Submodules().IsFocused()
t.Views().Main().Content(Contains("Submodule my_submodule contains modified content"))
t.Views().Files().Focus().
Lines(
MatchesRegexp(` M.*my_submodule \(submodule\)`).IsSelected(),
).
Press(keys.Universal.Remove).
Tap(func() {
t.ExpectPopup().Menu().Title(Equals("my_submodule")).Select(Contains("stash uncommitted submodule changes and update")).Confirm()
}).
IsEmpty()
t.Views().Submodules().Focus().
PressEnter()
assertInSubmodule()
// submodule has been hard reset to the commit the parent repo specifies
t.Views().Branches().Lines(
Contains("HEAD detached").IsSelected(),
Contains("master"),
)
// empty commit is gone
t.Views().Commits().Lines(
Contains("first commit").IsSelected(),
)
// the staged change has been stashed
t.Views().Files().IsEmpty()
t.Views().Stash().Focus().
Lines(
Contains("WIP on master").IsSelected(),
)
t.Views().Main().Content(Contains("my_file content"))
},
})

View File

@ -23,6 +23,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/integration/tests/misc"
"github.com/jesseduffield/lazygit/pkg/integration/tests/patch_building"
"github.com/jesseduffield/lazygit/pkg/integration/tests/stash"
"github.com/jesseduffield/lazygit/pkg/integration/tests/submodule"
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
)
@ -75,6 +76,10 @@ var tests = []*components.IntegrationTest{
filter_by_path.SelectFile,
filter_by_path.TypeFile,
patch_building.BuildPatchAndCopyToClipboard,
submodule.Add,
submodule.Remove,
submodule.Enter,
submodule.Reset,
}
func GetTests() []*components.IntegrationTest {

8
test/global_git_config Normal file
View File

@ -0,0 +1,8 @@
[user]
name = CI
email = CI@example.com
[protocol "file"]
# see https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html
allow = always
[commit]
gpgSign = false

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,8 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/./repo

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1,2 +0,0 @@
x�ÍM
ƒ0@á®sŠÙJ&Nþ Á•Ç“  I¡Þ¾¡ÛÇ/µZ×HîÖÐâRÑì%d"Áàr@ÃX<-4dG…“5Š?ýݘfxNó(_®û&�Ôê Ðä£ñ6Â]£Öêª×¤ËŸ\Õ³¬› ú5,ß

View File

@ -1,2 +0,0 @@
# pack-refs with: peeled fully-peeled sorted
42530e986dbb65877ed8d61ca0c816e425e5c62e refs/heads/master

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,13 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI
[submodule "blah"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/other_repo
active = true

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1,3 +0,0 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e dc5bde4a09968b0819f34d193f6780df295d71cf CI <CI@example.com> 1648348101 +1100 commit: test

View File

@ -1,3 +0,0 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e dc5bde4a09968b0819f34d193f6780df295d71cf CI <CI@example.com> 1648348101 +1100 commit: test

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,14 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
worktree = ../../../haha
[remote "origin"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/other_repo
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348097 +1100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/other_repo

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348097 +1100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/other_repo

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348097 +1100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleAdd/actual/other_repo

View File

@ -1,2 +0,0 @@
x�ÍM
ƒ0@á®sŠÙJ&Nþ Á•Ç“  I¡Þ¾¡ÛÇ/µZ×HîÖÐâRÑì%d"Áàr@ÃX<-4dG…“5Š?ýݘfxNó(_®û&�Ôê Ðä£ñ6Â]£Öêª×¤ËŸ\Õ³¬› ú5,ß

View File

@ -1,2 +0,0 @@
# pack-refs with: peeled fully-peeled sorted
42530e986dbb65877ed8d61ca0c816e425e5c62e refs/remotes/origin/master

View File

@ -1 +0,0 @@
42530e986dbb65877ed8d61ca0c816e425e5c62e

View File

@ -1,2 +0,0 @@
x�ÍM
ƒ0@á®sŠÙJ&Nþ Á•Ç“  I¡Þ¾¡ÛÇ/µZ×HîÖÐâRÑì%d"Áàr@ÃX<-4dG…“5Š?ýݘfxNó(_®û&�Ôê Ðä£ñ6Â]£Öêª×¤ËŸ\Õ³¬› ú5,ß

View File

@ -1 +0,0 @@
dc5bde4a09968b0819f34d193f6780df295d71cf

View File

@ -1,3 +0,0 @@
[submodule "blah"]
path = haha
url = ../other_repo

View File

@ -1 +0,0 @@
gitdir: ../.git/modules/blah

View File

@ -1 +0,0 @@
test1

View File

@ -1 +0,0 @@
test2

View File

@ -1 +0,0 @@
{"KeyEvents":[{"Timestamp":1858,"Mod":0,"Key":256,"Ch":93},{"Timestamp":4332,"Mod":0,"Key":256,"Ch":110},{"Timestamp":5067,"Mod":0,"Key":256,"Ch":46},{"Timestamp":5188,"Mod":0,"Key":256,"Ch":46},{"Timestamp":5323,"Mod":0,"Key":256,"Ch":47},{"Timestamp":5532,"Mod":0,"Key":256,"Ch":111},{"Timestamp":5652,"Mod":0,"Key":256,"Ch":116},{"Timestamp":5743,"Mod":0,"Key":256,"Ch":104},{"Timestamp":5862,"Mod":0,"Key":256,"Ch":101},{"Timestamp":5892,"Mod":0,"Key":256,"Ch":114},{"Timestamp":6102,"Mod":0,"Key":256,"Ch":95},{"Timestamp":6297,"Mod":0,"Key":256,"Ch":114},{"Timestamp":6312,"Mod":0,"Key":256,"Ch":101},{"Timestamp":6402,"Mod":0,"Key":256,"Ch":112},{"Timestamp":6432,"Mod":0,"Key":256,"Ch":111},{"Timestamp":6718,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7632,"Mod":0,"Key":127,"Ch":127},{"Timestamp":7966,"Mod":0,"Key":127,"Ch":127},{"Timestamp":7982,"Mod":0,"Key":127,"Ch":127},{"Timestamp":7998,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8015,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8031,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8049,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8065,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8081,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8097,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8113,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8129,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8146,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8162,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8178,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8195,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8212,"Mod":0,"Key":127,"Ch":127},{"Timestamp":8397,"Mod":0,"Key":256,"Ch":98},{"Timestamp":8578,"Mod":0,"Key":256,"Ch":108},{"Timestamp":8698,"Mod":0,"Key":256,"Ch":97},{"Timestamp":8787,"Mod":0,"Key":256,"Ch":104},{"Timestamp":9012,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9493,"Mod":0,"Key":127,"Ch":127},{"Timestamp":9717,"Mod":0,"Key":127,"Ch":127},{"Timestamp":9868,"Mod":0,"Key":127,"Ch":127},{"Timestamp":9973,"Mod":0,"Key":127,"Ch":127},{"Timestamp":10168,"Mod":0,"Key":256,"Ch":104},{"Timestamp":10228,"Mod":0,"Key":256,"Ch":97},{"Timestamp":10257,"Mod":0,"Key":256,"Ch":104},{"Timestamp":10393,"Mod":0,"Key":256,"Ch":97},{"Timestamp":10752,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12612,"Mod":0,"Key":256,"Ch":91},{"Timestamp":13543,"Mod":0,"Key":256,"Ch":99},{"Timestamp":13797,"Mod":0,"Key":256,"Ch":116},{"Timestamp":13857,"Mod":0,"Key":256,"Ch":101},{"Timestamp":14037,"Mod":0,"Key":256,"Ch":115},{"Timestamp":14081,"Mod":0,"Key":256,"Ch":116},{"Timestamp":14368,"Mod":0,"Key":13,"Ch":13},{"Timestamp":15312,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":36}]}

View File

@ -1,29 +0,0 @@
#!/bin/sh
set -e
cd $1
export GIT_COMMITTER_DATE="Mon 20 Aug 2018 20:19:19 BST"
export GIT_AUTHOR_DATE="Mon 20 Aug 2018 20:19:19 BST"
git init
git config user.email "CI@example.com"
git config user.name "CI"
# see https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html
# NOTE: I don't think this actually works if it's only applied to the repo.
# On CI we set the global setting, but given it's a security concern I don't want
# people to do that for their locals.
git config protocol.file.allow always
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
cd ..
git clone --bare ./repo other_repo
cd repo

View File

@ -1,4 +0,0 @@
{
"description": "Add submodule",
"speed": 5
}

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,8 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/./repo

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1,2 +0,0 @@
x�ÍM
ƒ0@á®sŠÙJ&Nþ Á•Ç“  I¡Þ¾¡ÛÇ/µZ×HîÖÐâRÑì%d"Áàr@ÃX<-4dG…“5Š?ýݘfxNó(_®û&�Ôê Ðä£ñ6Â]£Öêª×¤ËŸ\Õ³¬› ú5,ß

View File

@ -1,2 +0,0 @@
x��K
Β0@]ηΩ ’ίL&PDθ�ΗH&S,4¶”z{{·ο½Εγ­µ¥k›Β¥":!Ρμ(g†LR*oΐ!¦(δ$`ρ– «=ςκ:8πFa-�b”J-gΓdQN-ΐθDεwn‡'=�ΣC>Ήν«άxkwmΑ‡�\„¤―Ζ£NzNuω3Wν;/«xυ•¶9η

View File

@ -1,2 +0,0 @@
# pack-refs with: peeled fully-peeled sorted
fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 refs/heads/master

View File

@ -1 +0,0 @@
ref: refs/heads/master

View File

@ -1,13 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI
[submodule "other_repo"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/other_repo
active = true

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1,5 +0,0 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 CI <CI@example.com> 1534792759 +0100 commit: myfile3
fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 e1eb418c0ff98940d4ea817eebcff5dcdde645ce CI <CI@example.com> 1534792759 +0100 commit: add submodule
e1eb418c0ff98940d4ea817eebcff5dcdde645ce fd65a5c96edfc884a78bfe3d0240cb8a7ea0a31a CI <CI@example.com> 1648348036 +1100 commit: test

View File

@ -1,5 +0,0 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 CI <CI@example.com> 1534792759 +0100 commit: myfile3
fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 e1eb418c0ff98940d4ea817eebcff5dcdde645ce CI <CI@example.com> 1534792759 +0100 commit: add submodule
e1eb418c0ff98940d4ea817eebcff5dcdde645ce fd65a5c96edfc884a78bfe3d0240cb8a7ea0a31a CI <CI@example.com> 1648348036 +1100 commit: test

View File

@ -1 +0,0 @@
42530e986dbb65877ed8d61ca0c816e425e5c62e

View File

@ -1,14 +0,0 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
worktree = ../../../other_repo
[remote "origin"]
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/other_repo
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

View File

@ -1,5 +0,0 @@
0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield <jessedduffield@gmail.com> 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/other_repo
fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348031 +1100 rebase -i (start): checkout 42530e986dbb65877ed8d61ca0c816e425e5c62e
42530e986dbb65877ed8d61ca0c816e425e5c62e 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348031 +1100 rebase -i (finish): returning to refs/heads/master
42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield <jessedduffield@gmail.com> 1648348032 +1100 rebase -i (start): checkout a50a5125768001a3ea263ffb7cafbc421a508153
a50a5125768001a3ea263ffb7cafbc421a508153 a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield <jessedduffield@gmail.com> 1648348032 +1100 rebase -i (finish): returning to refs/heads/master

View File

@ -1,3 +0,0 @@
0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield <jessedduffield@gmail.com> 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/other_repo
fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 42530e986dbb65877ed8d61ca0c816e425e5c62e Jesse Duffield <jessedduffield@gmail.com> 1648348031 +1100 rebase -i (finish): refs/heads/master onto 42530e986dbb65877ed8d61ca0c816e425e5c62e
42530e986dbb65877ed8d61ca0c816e425e5c62e a50a5125768001a3ea263ffb7cafbc421a508153 Jesse Duffield <jessedduffield@gmail.com> 1648348032 +1100 rebase -i (finish): refs/heads/master onto a50a5125768001a3ea263ffb7cafbc421a508153

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 fc4712e93d74ad4fb68e2fd219ac253ae03e19a4 Jesse Duffield <jessedduffield@gmail.com> 1534792759 +0100 clone: from /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/submoduleEnter/actual/other_repo

Some files were not shown because too many files have changed in this diff Show More