1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-28 09:08:41 +02:00

add submodule integration tests

This commit is contained in:
Jesse Duffield 2022-01-28 21:56:01 +11:00
parent 1b09674ce8
commit 1d90e1b565
182 changed files with 517 additions and 34 deletions

10
.gitignore vendored
View File

@ -18,19 +18,21 @@ coverage.txt
# Binaries
lazygit
lazygit.exe
# Exceptions
!.gitignore
!.goreleaser.yml
!.circleci/
!.github/
# these are for our integration tests
!.git_keep
!.gitmodules_keep
test/git_server/data
test/integration/*/actual/
test/integration/*/actual_remote/
test/integration/*/used_config/
# these sample hooks waste too much space
test/integration/*/expected/.git_keep/hooks/
test/integration/*/expected_remote/hooks/
!.git_keep/
lazygit.exe
test/integration/*/expected/**/hooks/
test/integration/*/expected_remote/**/hooks/

View File

@ -101,6 +101,7 @@ func RunTests(
expectedRepoDir := filepath.Join(testPath, "expected")
actualRemoteDir := filepath.Join(testPath, "actual_remote")
expectedRemoteDir := filepath.Join(testPath, "expected_remote")
otherRepoDir := filepath.Join(testPath, "other_repo")
logf("path: %s", testPath)
for i, speed := range speeds {
@ -110,7 +111,8 @@ func RunTests(
findOrCreateDir(testPath)
prepareIntegrationTestDir(actualRepoDir)
removeRemoteDir(actualRemoteDir)
removeDir(otherRepoDir)
removeDir(actualRemoteDir)
err := createFixture(testPath, actualRepoDir)
if err != nil {
return err
@ -128,16 +130,21 @@ func RunTests(
return err
}
// submodule tests currently make use of a repo called 'other_repo' but we don't want that
// to stick around. Long-term we should have an 'actual' folder which itself contains
// repos, and there we can put the 'repo' repo which is the main one, alongside
// any others that we use as part of the test (including remotes). Then we'll do snapshots for
// each of them.
removeDir(otherRepoDir)
if mode == UPDATE_SNAPSHOT || mode == RECORD {
// create/update snapshot
err = oscommands.CopyDir(actualRepoDir, expectedRepoDir)
if err != nil {
return err
}
err = os.Rename(
filepath.Join(expectedRepoDir, ".git"),
filepath.Join(expectedRepoDir, ".git_keep"),
)
if err != nil {
if err := renameGitDirs(expectedRepoDir); err != nil {
return err
}
@ -148,11 +155,12 @@ func RunTests(
return err
}
} else {
removeRemoteDir(expectedRemoteDir)
removeDir(expectedRemoteDir)
}
}
if mode != SANDBOX {
logf("%s", "updated snapshot")
} else {
// compare result to snapshot
actualRepo, expectedRepo, err := generateSnapshots(actualRepoDir, expectedRepoDir)
if err != nil {
return err
@ -174,7 +182,7 @@ func RunTests(
break
}
// if the snapshots and we haven't tried all playback speeds different we'll retry at a slower speed
// if the snapshot doesn't match and we haven't tried all playback speeds different we'll retry at a slower speed
if i == len(speeds)-1 {
// get the log file and print that
bytes, err := ioutil.ReadFile(filepath.Join(configDir, "development.log"))
@ -198,7 +206,7 @@ func RunTests(
return nil
}
func removeRemoteDir(dir string) {
func removeDir(dir string) {
err := os.RemoveAll(dir)
if err != nil {
panic(err)
@ -334,6 +342,10 @@ func findOrCreateDir(path string) {
}
}
// note that we don't actually store this snapshot in the lazygit repo.
// Instead we store the whole expected git repo of our test, so that
// we can easily change what we want to compare without needing to regenerate
// snapshots for each test.
func generateSnapshot(dir string) (string, error) {
osCommand := oscommands.NewDummyOSCommand()
@ -345,18 +357,24 @@ func generateSnapshot(dir string) (string, error) {
snapshot := ""
cmdStrs := []string{
fmt.Sprintf(`git -C %s status`, dir), // file tree
fmt.Sprintf(`git -C %s log --pretty=%%B -p -1`, dir), // log
fmt.Sprintf(`git -C %s tag -n`, dir), // tags
`status`, // file tree
`log --pretty=%B -p -1`, // log
`tag -n`, // tags
`stash list`, // stash
`submodule foreach 'git status'`, // submodule status
`submodule foreach 'git log --pretty=%B -p -1'`, // submodule log
`submodule foreach 'git tag -n'`, // submodule tags
`submodule foreach 'git stash list'`, // submodule stash
}
for _, cmdStr := range cmdStrs {
// ignoring error for now. If there's an error it could be that there are no results
output, _ := osCommand.Cmd.New(cmdStr).RunWithOutput()
output, _ := osCommand.Cmd.New(fmt.Sprintf("git -C %s %s", dir, cmdStr)).RunWithOutput()
snapshot += output + "\n"
snapshot += fmt.Sprintf("git %s:\n%s\n", cmdStr, output)
}
snapshot += "files in repo:\n"
err = filepath.Walk(dir, func(path string, f os.FileInfo, err error) error {
if err != nil {
return err
@ -373,7 +391,12 @@ func generateSnapshot(dir string) (string, error) {
if err != nil {
return err
}
snapshot += string(bytes) + "\n"
relativePath, err := filepath.Rel(dir, path)
if err != nil {
return err
}
snapshot += fmt.Sprintf("path: %s\ncontent:\n%s\n", relativePath, string(bytes))
return nil
})
@ -391,24 +414,15 @@ func generateSnapshots(actualDir string, expectedDir string) (string, string, er
return "", "", err
}
// git refuses to track .git folders in subdirectories so we need to rename it
// to git_keep after running a test, and then change it back again
defer func() {
err = os.Rename(
filepath.Join(expectedDir, ".git"),
filepath.Join(expectedDir, ".git_keep"),
)
if err != nil {
if err := renameGitDirs(expectedDir); err != nil {
panic(err)
}
}()
// ignoring this error because we might not have a .git_keep file here yet.
_ = os.Rename(
filepath.Join(expectedDir, ".git_keep"),
filepath.Join(expectedDir, ".git"),
)
if err := restoreGitDirs(expectedDir); err != nil {
return "", "", err
}
expected, err := generateSnapshot(expectedDir)
if err != nil {
@ -418,6 +432,57 @@ func generateSnapshots(actualDir string, expectedDir string) (string, string, er
return actual, expected, nil
}
func getPathsToRename(dir string, needle string) []string {
pathsToRename := []string{}
err := filepath.Walk(dir, func(path string, f os.FileInfo, err error) error {
if err != nil {
return err
}
if f.Name() == needle {
pathsToRename = append(pathsToRename, path)
}
return nil
})
if err != nil {
panic(err)
}
return pathsToRename
}
// Git refuses to track .git and .gitmodules folders in subdirectories so we need to rename it
// to git_keep after running a test, and then change it back again
var untrackedGitDirs []string = []string{".git", ".gitmodules"}
func renameGitDirs(dir string) error {
for _, untrackedGitDir := range untrackedGitDirs {
for _, path := range getPathsToRename(dir, untrackedGitDir) {
err := os.Rename(path, path+"_keep")
if err != nil {
return err
}
}
}
return nil
}
func restoreGitDirs(dir string) error {
for _, untrackedGitDir := range untrackedGitDirs {
for _, path := range getPathsToRename(dir, untrackedGitDir+"_keep") {
err := os.Rename(path, strings.TrimSuffix(path, "_keep"))
if err != nil {
return err
}
}
}
return nil
}
func generateSnapshotsForRemote(actualDir string, expectedDir string) (string, string, error) {
actual, err := generateSnapshot(actualDir)
if err != nil {

View File

@ -0,0 +1 @@
test

View File

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

View File

@ -0,0 +1,13 @@
[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/other_repo
active = true

View File

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

Binary file not shown.

View File

@ -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

View File

@ -0,0 +1,3 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e 6de70e35394a99cc437d1bc70b0852b70c5bb03d CI <CI@example.com> 1617797593 +1000 commit: test

View File

@ -0,0 +1,3 @@
0000000000000000000000000000000000000000 a50a5125768001a3ea263ffb7cafbc421a508153 CI <CI@example.com> 1534792759 +0100 commit (initial): myfile1
a50a5125768001a3ea263ffb7cafbc421a508153 42530e986dbb65877ed8d61ca0c816e425e5c62e CI <CI@example.com> 1534792759 +0100 commit: myfile2
42530e986dbb65877ed8d61ca0c816e425e5c62e 6de70e35394a99cc437d1bc70b0852b70c5bb03d CI <CI@example.com> 1617797593 +1000 commit: test

View File

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

View File

@ -0,0 +1,14 @@
[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/other_repo
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1 @@
42530e986dbb65877ed8d61ca0c816e425e5c62e

View File

@ -0,0 +1 @@
ref: refs/remotes/origin/master

View File

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

View File

@ -0,0 +1 @@
6de70e35394a99cc437d1bc70b0852b70c5bb03d

View File

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

View File

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

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
test2

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
test2

View File

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

@ -0,0 +1,24 @@
#!/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"
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
cd ..
git clone --bare ./actual other_repo
cd actual

View File

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

View File

@ -0,0 +1 @@
test

View File

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

View File

@ -0,0 +1,13 @@
[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/other_repo
active = true

View File

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

View File

@ -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

View File

@ -0,0 +1,5 @@
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 c83cc777cf98a8c0f3c0995d7c1b21db92a71c66 CI <CI@example.com> 1643370762 +1100 commit: test

View File

@ -0,0 +1,5 @@
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 c83cc777cf98a8c0f3c0995d7c1b21db92a71c66 CI <CI@example.com> 1643370762 +1100 commit: test

View File

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

View File

@ -0,0 +1 @@
42530e986dbb65877ed8d61ca0c816e425e5c62e

View File

@ -0,0 +1,14 @@
[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/other_repo
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

@ -0,0 +1 @@
a50a5125768001a3ea263ffb7cafbc421a508153

View File

@ -0,0 +1 @@
ref: refs/remotes/origin/master

View File

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

View File

@ -0,0 +1,2 @@
x�ÎK
Â0FaÇYEæ‚ÜÛäæ"‚£.#�?([j—o—àôð NYz Í‘c4“oÖˆ>DÉ`r¡›ÉÕ&RŒHŠuŠ™Õš6¼†#[…Z‹!Zª)°riMj©ÎJ�JŸq_6}›õù6_ñM}}âT–~Ñì¬1ž¼›ô‘™HíuŸø“«�÷P?"Û9¾

View File

@ -0,0 +1,4 @@
x�ŽK
Â0@]ç³d2ù9 "tÕcL“
�-5�o�àîñx‹——Ö^ñÔ7U,,ªDCJ‘”ŠÍ³` :ëRaŒf•MßjöÉ’²+ÉKñuŠW¥ZȲd
N�ì�ìý¹l0ŒpƇ~¥­³^òÒî`ƒó‰)†3ZDsØcªëŸ¹‘Rà³Om)û¬æê‘<K

View File

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

@ -0,0 +1 @@
c83cc777cf98a8c0f3c0995d7c1b21db92a71c66

View File

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

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
test2

View File

@ -0,0 +1 @@
test2

View File

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

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":737,"Mod":0,"Key":256,"Ch":93},{"Timestamp":1306,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1937,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2162,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2462,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2687,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3049,"Mod":0,"Key":256,"Ch":100},{"Timestamp":3242,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3862,"Mod":0,"Key":27,"Ch":0},{"Timestamp":5177,"Mod":0,"Key":256,"Ch":91},{"Timestamp":6272,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6752,"Mod":0,"Key":256,"Ch":99},{"Timestamp":7007,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7051,"Mod":0,"Key":256,"Ch":101},{"Timestamp":7232,"Mod":0,"Key":256,"Ch":115},{"Timestamp":7276,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7547,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8251,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -0,0 +1,30 @@
#!/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"
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
echo test2 > myfile3
git add .
git commit -am "myfile3"
cd ..
git clone --bare ./actual other_repo
cd actual
git submodule add ../other_repo
git commit -am "add submodule"

View File

@ -0,0 +1,4 @@
{
"description": "Add submodule and enter. We enter the submodule, remove a couple of commits, and then stage the change in the parent repo",
"speed": 5
}

View File

@ -0,0 +1 @@
remove submodule

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