mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-21 12:16:54 +02:00
Merge pull request #2339 from jesseduffield/integration-tests-5
This commit is contained in:
commit
cceff63823
@ -290,8 +290,13 @@ func (gui *Gui) clearConfirmationViewKeyBindings() {
|
|||||||
|
|
||||||
func (gui *Gui) refreshSuggestions() {
|
func (gui *Gui) refreshSuggestions() {
|
||||||
gui.suggestionsAsyncHandler.Do(func() func() {
|
gui.suggestionsAsyncHandler.Do(func() func() {
|
||||||
|
findSuggestionsFn := gui.findSuggestions
|
||||||
|
if findSuggestionsFn != nil {
|
||||||
suggestions := gui.findSuggestions(gui.c.GetPromptInput())
|
suggestions := gui.findSuggestions(gui.c.GetPromptInput())
|
||||||
return func() { gui.setSuggestions(suggestions) }
|
return func() { gui.setSuggestions(suggestions) }
|
||||||
|
} else {
|
||||||
|
return func() {}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,3 +170,32 @@ func (self *Shell) SetConfig(key string, value string) *Shell {
|
|||||||
self.RunCommand(fmt.Sprintf(`git config --local "%s" %s`, key, value))
|
self.RunCommand(fmt.Sprintf(`git config --local "%s" %s`, key, value))
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// creates a clone of the repo in a sibling directory and adds the clone
|
||||||
|
// as a remote, then fetches it.
|
||||||
|
func (self *Shell) CloneIntoRemote(name string) *Shell {
|
||||||
|
self.RunCommand(fmt.Sprintf("git clone --bare . ../%s", name))
|
||||||
|
self.RunCommand(fmt.Sprintf("git remote add %s ../%s", name, name))
|
||||||
|
self.RunCommand(fmt.Sprintf("git fetch %s", name))
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
|
||||||
|
// e.g. branch: 'master', upstream: 'origin/master'
|
||||||
|
func (self *Shell) SetBranchUpstream(branch string, upstream string) *Shell {
|
||||||
|
self.RunCommand(fmt.Sprintf("git branch --set-upstream-to=%s %s", upstream, branch))
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
|
||||||
|
func (self *Shell) RemoveRemoteBranch(remoteName string, branch string) *Shell {
|
||||||
|
self.RunCommand(fmt.Sprintf("git -C ../%s branch -d %s", remoteName, branch))
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
|
||||||
|
func (self *Shell) HardReset(ref string) *Shell {
|
||||||
|
self.RunCommand(fmt.Sprintf("git reset --hard %s", ref))
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
package file
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/config"
|
|
||||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
||||||
)
|
|
||||||
|
|
||||||
var ExcludeGitignore = NewIntegrationTest(NewIntegrationTestArgs{
|
|
||||||
Description: "Failed attempt at excluding and ignoring the .gitignore file",
|
|
||||||
ExtraCmdArgs: "",
|
|
||||||
Skip: false,
|
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
|
||||||
},
|
|
||||||
SetupRepo: func(shell *Shell) {
|
|
||||||
shell.CreateFile(".gitignore", "")
|
|
||||||
},
|
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
||||||
t.Views().Files().
|
|
||||||
IsFocused().
|
|
||||||
Lines(
|
|
||||||
Contains(`?? .gitignore`).IsSelected(),
|
|
||||||
).
|
|
||||||
Press(keys.Files.IgnoreFile).
|
|
||||||
Tap(func() {
|
|
||||||
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .git/info/exclude")).Confirm()
|
|
||||||
|
|
||||||
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Equals("Cannot exclude .gitignore")).Confirm()
|
|
||||||
}).
|
|
||||||
Press(keys.Files.IgnoreFile).
|
|
||||||
Tap(func() {
|
|
||||||
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .gitignore")).Confirm()
|
|
||||||
|
|
||||||
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Equals("Cannot ignore .gitignore")).Confirm()
|
|
||||||
})
|
|
||||||
|
|
||||||
t.FileSystem().FileContent(".gitignore", Equals(""))
|
|
||||||
t.FileSystem().FileContent(".git/info/exclude", DoesNotContain(".gitignore"))
|
|
||||||
},
|
|
||||||
})
|
|
63
pkg/integration/tests/file/gitignore.go
Normal file
63
pkg/integration/tests/file/gitignore.go
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
package file
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var GitIgnore = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Verify that we can't ignore the .gitignore file, then ignore/exclude other files",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
shell.CreateFile(".gitignore", "")
|
||||||
|
shell.CreateFile("toExclude", "")
|
||||||
|
shell.CreateFile("toIgnore", "")
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Files().
|
||||||
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains(`?? .gitignore`).IsSelected(),
|
||||||
|
Contains(`?? toExclude`),
|
||||||
|
Contains(`?? toIgnore`),
|
||||||
|
).
|
||||||
|
Press(keys.Files.IgnoreFile).
|
||||||
|
// ensure we can't exclude the .gitignore file
|
||||||
|
Tap(func() {
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .git/info/exclude")).Confirm()
|
||||||
|
|
||||||
|
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Equals("Cannot exclude .gitignore")).Confirm()
|
||||||
|
}).
|
||||||
|
Press(keys.Files.IgnoreFile).
|
||||||
|
// ensure we can't ignore the .gitignore file
|
||||||
|
Tap(func() {
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .gitignore")).Confirm()
|
||||||
|
|
||||||
|
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Equals("Cannot ignore .gitignore")).Confirm()
|
||||||
|
|
||||||
|
t.FileSystem().FileContent(".gitignore", Equals(""))
|
||||||
|
t.FileSystem().FileContent(".git/info/exclude", DoesNotContain(".gitignore"))
|
||||||
|
}).
|
||||||
|
SelectNextItem().
|
||||||
|
Press(keys.Files.IgnoreFile).
|
||||||
|
// exclude a file
|
||||||
|
Tap(func() {
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .git/info/exclude")).Confirm()
|
||||||
|
|
||||||
|
t.FileSystem().FileContent(".gitignore", Equals(""))
|
||||||
|
t.FileSystem().FileContent(".git/info/exclude", Contains("toExclude"))
|
||||||
|
}).
|
||||||
|
SelectNextItem().
|
||||||
|
Press(keys.Files.IgnoreFile).
|
||||||
|
// ignore a file
|
||||||
|
Tap(func() {
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("ignore or exclude file")).Select(Contains("add to .gitignore")).Confirm()
|
||||||
|
|
||||||
|
t.FileSystem().FileContent(".gitignore", Equals("toIgnore\n"))
|
||||||
|
t.FileSystem().FileContent(".git/info/exclude", Contains("toExclude"))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
20
pkg/integration/tests/filter_by_path/cli.go
Normal file
20
pkg/integration/tests/filter_by_path/cli.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package filter_by_path
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var CliArg = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Filter commits by file path, using CLI arg",
|
||||||
|
ExtraCmdArgs: "-f filterFile",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
commonSetup(shell)
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
postFilterTest(t)
|
||||||
|
},
|
||||||
|
})
|
76
pkg/integration/tests/filter_by_path/select_file.go
Normal file
76
pkg/integration/tests/filter_by_path/select_file.go
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
package filter_by_path
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var SelectFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Filter commits by file path, by finding file in UI and filtering on it",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
commonSetup(shell)
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Commits().
|
||||||
|
Focus().
|
||||||
|
Lines(
|
||||||
|
Contains(`only filterFile`).IsSelected(),
|
||||||
|
Contains(`only otherFile`),
|
||||||
|
Contains(`both files`),
|
||||||
|
).
|
||||||
|
PressEnter()
|
||||||
|
|
||||||
|
// when you click into the commit itself, you see all files from that commit
|
||||||
|
t.Views().CommitFiles().
|
||||||
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains(`filterFile`).IsSelected(),
|
||||||
|
).
|
||||||
|
Press(keys.Universal.FilteringMenu)
|
||||||
|
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("Filtering")).Select(Contains("filter by 'filterFile'")).Confirm()
|
||||||
|
|
||||||
|
postFilterTest(t)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
func commonSetup(shell *Shell) {
|
||||||
|
shell.CreateFileAndAdd("filterFile", "original filterFile content")
|
||||||
|
shell.CreateFileAndAdd("otherFile", "original otherFile content")
|
||||||
|
shell.Commit("both files")
|
||||||
|
|
||||||
|
shell.UpdateFileAndAdd("otherFile", "new otherFile content")
|
||||||
|
shell.Commit("only otherFile")
|
||||||
|
|
||||||
|
shell.UpdateFileAndAdd("filterFile", "new filterFile content")
|
||||||
|
shell.Commit("only filterFile")
|
||||||
|
}
|
||||||
|
|
||||||
|
func postFilterTest(t *TestDriver) {
|
||||||
|
t.Views().Information().Content(Contains("filtering by 'filterFile'"))
|
||||||
|
|
||||||
|
t.Views().Commits().
|
||||||
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains(`only filterFile`).IsSelected(),
|
||||||
|
Contains(`both files`),
|
||||||
|
).
|
||||||
|
SelectNextItem().
|
||||||
|
PressEnter()
|
||||||
|
|
||||||
|
// we only show the filtered file's changes in the main view
|
||||||
|
t.Views().Main().
|
||||||
|
Content(Contains("filterFile").DoesNotContain("otherFile"))
|
||||||
|
|
||||||
|
// when you click into the commit itself, you see all files from that commit
|
||||||
|
t.Views().CommitFiles().
|
||||||
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains(`filterFile`),
|
||||||
|
Contains(`otherFile`),
|
||||||
|
)
|
||||||
|
}
|
35
pkg/integration/tests/filter_by_path/type_file.go
Normal file
35
pkg/integration/tests/filter_by_path/type_file.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package filter_by_path
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var TypeFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Filter commits by file path, by finding file in UI and filtering on it",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
commonSetup(shell)
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Files().
|
||||||
|
IsFocused().
|
||||||
|
Press(keys.Universal.FilteringMenu)
|
||||||
|
|
||||||
|
t.ExpectPopup().Menu().
|
||||||
|
Title(Equals("Filtering")).
|
||||||
|
Select(Contains("enter path to filter by")).
|
||||||
|
Confirm()
|
||||||
|
|
||||||
|
t.ExpectPopup().Prompt().
|
||||||
|
Title(Equals("Enter path:")).
|
||||||
|
Type("filterF").
|
||||||
|
SuggestionLines(Equals("filterFile")).
|
||||||
|
ConfirmFirstSuggestion()
|
||||||
|
|
||||||
|
postFilterTest(t)
|
||||||
|
},
|
||||||
|
})
|
49
pkg/integration/tests/sync/fetch_prune.go
Normal file
49
pkg/integration/tests/sync/fetch_prune.go
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var FetchPrune = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Fetch from the remote with the 'prune' option set in the git config",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
config.UserConfig.Git.AutoFetch = false
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
// This option makes it so that git checks for deleted branches in the remote
|
||||||
|
// upon fetching.
|
||||||
|
shell.SetConfig("fetch.prune", "true")
|
||||||
|
|
||||||
|
shell.EmptyCommit("my commit message")
|
||||||
|
|
||||||
|
shell.NewBranch("branch_to_remove")
|
||||||
|
shell.Checkout("master")
|
||||||
|
shell.CloneIntoRemote("origin")
|
||||||
|
shell.SetBranchUpstream("master", "origin/master")
|
||||||
|
shell.SetBranchUpstream("branch_to_remove", "origin/branch_to_remove")
|
||||||
|
|
||||||
|
// # unbenownst to our test repo we're removing the branch on the remote, so upon
|
||||||
|
// # fetching with prune: true we expect git to realise the remote branch is gone
|
||||||
|
shell.RemoveRemoteBranch("origin", "branch_to_remove")
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Branches().
|
||||||
|
Lines(
|
||||||
|
Contains("master"),
|
||||||
|
Contains("branch_to_remove").DoesNotContain("upstream gone"),
|
||||||
|
)
|
||||||
|
|
||||||
|
t.Views().Files().
|
||||||
|
IsFocused().
|
||||||
|
Press(keys.Files.Fetch)
|
||||||
|
|
||||||
|
t.Views().Branches().
|
||||||
|
Lines(
|
||||||
|
Contains("master"),
|
||||||
|
Contains("branch_to_remove").Contains("upstream gone"),
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
57
pkg/integration/tests/sync/rename_branch_and_pull.go
Normal file
57
pkg/integration/tests/sync/rename_branch_and_pull.go
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package sync
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var RenameBranchAndPull = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Rename a branch to no longer match its upstream, then pull from the upstream",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
config.UserConfig.Git.AutoFetch = false
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
shell.EmptyCommit("one")
|
||||||
|
shell.EmptyCommit("two")
|
||||||
|
|
||||||
|
shell.CloneIntoRemote("origin")
|
||||||
|
shell.SetBranchUpstream("master", "origin/master")
|
||||||
|
|
||||||
|
// remove the 'two' commit so that we have something to pull from the remote
|
||||||
|
shell.HardReset("HEAD^")
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Commits().
|
||||||
|
Lines(
|
||||||
|
Contains("one"),
|
||||||
|
)
|
||||||
|
|
||||||
|
t.Views().Branches().
|
||||||
|
Focus().
|
||||||
|
Lines(
|
||||||
|
Contains("master"),
|
||||||
|
).
|
||||||
|
Press(keys.Branches.RenameBranch).
|
||||||
|
Tap(func() {
|
||||||
|
t.ExpectPopup().Confirmation().
|
||||||
|
Title(Equals("rename branch")).
|
||||||
|
Content(Equals("This branch is tracking a remote. This action will only rename the local branch name, not the name of the remote branch. Continue?")).
|
||||||
|
Confirm()
|
||||||
|
|
||||||
|
t.ExpectPopup().Prompt().
|
||||||
|
Title(Contains("Enter new branch name")).
|
||||||
|
InitialText(Equals("master")).
|
||||||
|
Type("-local").
|
||||||
|
Confirm()
|
||||||
|
}).
|
||||||
|
Press(keys.Universal.PullFiles)
|
||||||
|
|
||||||
|
t.Views().Commits().
|
||||||
|
Lines(
|
||||||
|
Contains("two"),
|
||||||
|
Contains("one"),
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
@ -18,9 +18,11 @@ import (
|
|||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/diff"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/diff"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/file"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/file"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/filter_by_path"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/interactive_rebase"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/interactive_rebase"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/misc"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/misc"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/stash"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/stash"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Here is where we lists the actual tests that will run. When you create a new test,
|
// Here is where we lists the actual tests that will run. When you create a new test,
|
||||||
@ -54,7 +56,7 @@ var tests = []*components.IntegrationTest{
|
|||||||
file.DirWithUntrackedFile,
|
file.DirWithUntrackedFile,
|
||||||
file.DiscardChanges,
|
file.DiscardChanges,
|
||||||
file.DiscardStagedChanges,
|
file.DiscardStagedChanges,
|
||||||
file.ExcludeGitignore,
|
file.GitIgnore,
|
||||||
interactive_rebase.AmendMerge,
|
interactive_rebase.AmendMerge,
|
||||||
interactive_rebase.One,
|
interactive_rebase.One,
|
||||||
stash.Rename,
|
stash.Rename,
|
||||||
@ -64,6 +66,11 @@ var tests = []*components.IntegrationTest{
|
|||||||
diff.Diff,
|
diff.Diff,
|
||||||
diff.DiffAndApplyPatch,
|
diff.DiffAndApplyPatch,
|
||||||
diff.DiffCommits,
|
diff.DiffCommits,
|
||||||
|
sync.FetchPrune,
|
||||||
|
sync.RenameBranchAndPull,
|
||||||
|
filter_by_path.CliArg,
|
||||||
|
filter_by_path.SelectFile,
|
||||||
|
filter_by_path.TypeFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetTests() []*components.IntegrationTest {
|
func GetTests() []*components.IntegrationTest {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Initial commit
|
|
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master
|
|
@ -1,10 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
ignorecase = true
|
|
||||||
precomposeunicode = true
|
|
||||||
[user]
|
|
||||||
email = CI@example.com
|
|
||||||
name = CI
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
Binary file not shown.
@ -1,9 +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
|
|
||||||
|
|
||||||
myfile1
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 129cdae0c4ccd050e8398bcb18b2ce1e4a5626f9 CI <CI@example.com> 1657012793 +1000 commit (initial): Initial commit
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 129cdae0c4ccd050e8398bcb18b2ce1e4a5626f9 CI <CI@example.com> 1657012793 +1000 commit (initial): Initial commit
|
|
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
129cdae0c4ccd050e8398bcb18b2ce1e4a5626f9
|
|
@ -1 +0,0 @@
|
|||||||
test1
|
|
@ -1 +0,0 @@
|
|||||||
{"KeyEvents":[{"Timestamp":788,"Mod":0,"Key":256,"Ch":105},{"Timestamp":2342,"Mod":0,"Key":256,"Ch":101},{"Timestamp":3429,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":238,"Height":61}]}
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd $1
|
|
||||||
|
|
||||||
git init
|
|
||||||
|
|
||||||
git config user.email "CI@example.com"
|
|
||||||
git config user.name "CI"
|
|
||||||
|
|
||||||
git commit --allow-empty -m "Initial commit"
|
|
||||||
|
|
||||||
echo test1 > myfile1
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "In this test a file is added to .git/info/exclude using the ignore or exclude menu",
|
|
||||||
"speed": 5
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
disableStartupPopups: true
|
|
||||||
git:
|
|
||||||
autoFetch: false
|
|
||||||
gui:
|
|
||||||
theme:
|
|
||||||
activeBorderColor:
|
|
||||||
- green
|
|
||||||
- bold
|
|
||||||
SelectedRangeBgcolor:
|
|
||||||
- reverse
|
|
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master
|
|
@ -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/fetchPrune/actual/./repo
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
@ -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
|
|
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
x�ÍA
|
|
||||||
Â0@Q×9ÅìɤÓI¡«cšL°Ð!R"èííÜ~üÜÌÖH|ê»*xå\½ð¯š
|
|
||||||
‘bâ’0ÖH
…©Jƒ“w¶¦nÓüÐ�ØkÓKnvdJÃ"#œ½wG=&]ÿäξuÝÝ2Ž,Ï
|
|
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
# pack-refs with: peeled fully-peeled sorted
|
|
||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 refs/heads/master
|
|
@ -1 +0,0 @@
|
|||||||
myfile1
|
|
@ -1 +0,0 @@
|
|||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 branch 'master' of ../origin
|
|
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master
|
|
@ -1,21 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
ignorecase = true
|
|
||||||
precomposeunicode = true
|
|
||||||
[user]
|
|
||||||
email = CI@example.com
|
|
||||||
name = CI
|
|
||||||
[fetch]
|
|
||||||
prune = true
|
|
||||||
[remote "origin"]
|
|
||||||
url = ../origin
|
|
||||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
|
||||||
[branch "master"]
|
|
||||||
remote = origin
|
|
||||||
merge = refs/heads/master
|
|
||||||
[branch "other_branch"]
|
|
||||||
remote = origin
|
|
||||||
merge = refs/heads/other_branch
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
Binary file not shown.
@ -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
|
|
@ -1,3 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 commit (initial): myfile1
|
|
||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 checkout: moving from master to other_branch
|
|
||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 checkout: moving from other_branch to master
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 commit (initial): myfile1
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 branch: Created from HEAD
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27 CI <CI@example.com> 1648352761 +1100 fetch origin: storing head
|
|
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
x�ÍA
|
|
||||||
Â0@Q×9ÅìɤÓI¡«cšL°Ð!R"èííÜ~üÜÌÖH|ê»*xå\½ð¯š
|
|
||||||
‘bâ’0ÖH
…©Jƒ“w¶¦nÓüÐ�ØkÓKnvdJÃ"#œ½wG=&]ÿäξuÝÝ2Ž,Ï
|
|
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
# pack-refs with: peeled fully-peeled sorted
|
|
@ -1 +0,0 @@
|
|||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27
|
|
@ -1 +0,0 @@
|
|||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27
|
|
@ -1 +0,0 @@
|
|||||||
75f37fc5ae7e9967e9833b66beb2c9ee2f9f6c27
|
|
@ -1 +0,0 @@
|
|||||||
test1
|
|
@ -1 +0,0 @@
|
|||||||
{"KeyEvents":[{"Timestamp":608,"Mod":0,"Key":256,"Ch":102},{"Timestamp":1568,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd $1
|
|
||||||
|
|
||||||
git init
|
|
||||||
|
|
||||||
git config user.email "CI@example.com"
|
|
||||||
git config user.name "CI"
|
|
||||||
|
|
||||||
# we're setting this to ensure that it's honoured by the fetch command
|
|
||||||
git config fetch.prune true
|
|
||||||
|
|
||||||
echo test1 > myfile1
|
|
||||||
git add .
|
|
||||||
git commit -am "myfile1"
|
|
||||||
|
|
||||||
git checkout -b other_branch
|
|
||||||
git checkout master
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
git clone --bare ./repo origin
|
|
||||||
|
|
||||||
cd repo
|
|
||||||
|
|
||||||
git remote add origin ../origin
|
|
||||||
git fetch origin
|
|
||||||
git branch --set-upstream-to=origin/master master
|
|
||||||
git branch --set-upstream-to=origin/other_branch other_branch
|
|
||||||
|
|
||||||
# unbenownst to our test repo we're removing the branch on the remote, so upon
|
|
||||||
# fetching with prune: true we expect git to realise the remote branch is gone
|
|
||||||
git -C ../origin branch -d other_branch
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"description": "fetch from the remote with the 'prune' option set in the git config. Note this has a false positive until we find a way to show ls-remote origin in all tests when creating snapshots.",
|
|
||||||
"speed": 10
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master
|
|
@ -1,6 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = true
|
|
||||||
[remote "origin"]
|
|
||||||
url = /home/mark/Downloads/gits/lazygit/test/integration/fetchRemoteBranchWithNonmatchingName/actual/./repo
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
@ -1,6 +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]
|
|
||||||
# *~
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
x�ÍA
|
|
||||||
Â0@Q×9Å왉ÓI
|
|
||||||
"BW=FšL°Ð!R"èííÜ~üÜÌÖÄrê»* J®˜d £ÆÂ¬¥Dò‰jà…¯E¸¦<x—ÞýÙv˜f¸MóC?É^›^r³;�L9ŒpF�èŽzLºþÉ�}ëº)¹2ê,Ó
|
|
@ -1,2 +0,0 @@
|
|||||||
x�ŽA
|
|
||||||
à E»öîÅqÆD!”BV9†Ž#
Ä&ííëºúðyïóy¯um]Ú)¢m‚Ù�!–HXJÌ€Åö Á²ëÉ¢ŽxÊ«‹6£Gœ t~L‘†.$è£Òñ�
ßí¹Ÿz^ô4/ùÄzlrã½Þ5ŽÀxƒ¾kŒêm?ÕäO\ÕoY7Aõñ?:l
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
# pack-refs with: peeled fully-peeled sorted
|
|
||||||
b090d7f0029e74de260f7458721b8edd1e618edc refs/heads/master
|
|
@ -1 +0,0 @@
|
|||||||
myfile4
|
|
@ -1 +0,0 @@
|
|||||||
b090d7f0029e74de260f7458721b8edd1e618edc branch 'master' of ../origin
|
|
@ -1 +0,0 @@
|
|||||||
ref: refs/heads/master-local
|
|
@ -1 +0,0 @@
|
|||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f
|
|
@ -1,14 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
[user]
|
|
||||||
email = CI@example.com
|
|
||||||
name = CI
|
|
||||||
[remote "origin"]
|
|
||||||
url = ../origin
|
|
||||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
|
||||||
[branch "master-local"]
|
|
||||||
remote = origin
|
|
||||||
merge = refs/heads/master
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
Binary file not shown.
@ -1,6 +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]
|
|
||||||
# *~
|
|
@ -1,8 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI <CI@example.com> 1654108479 +0200 commit (initial): myfile1
|
|
||||||
3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 commit: myfile2
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI <CI@example.com> 1654108479 +0200 commit: myfile3
|
|
||||||
72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 commit: myfile4
|
|
||||||
b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 reset: moving to HEAD~2
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f 0000000000000000000000000000000000000000 CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
|
|
||||||
0000000000000000000000000000000000000000 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward
|
|
@ -1,7 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 CI <CI@example.com> 1654108479 +0200 commit (initial): myfile1
|
|
||||||
3e5a250f3b6d2ea4ea93b3006aaceeb75bb8d0b6 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 commit: myfile2
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f 72ee6cc86de71389b9c70e24c7d8c8837e7d3566 CI <CI@example.com> 1654108479 +0200 commit: myfile3
|
|
||||||
72ee6cc86de71389b9c70e24c7d8c8837e7d3566 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 commit: myfile4
|
|
||||||
b090d7f0029e74de260f7458721b8edd1e618edc 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108479 +0200 reset: moving to HEAD~2
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f 12d38e54cd419303587ba4613fb1194ec5c9d04f CI <CI@example.com> 1654108482 +0200 Branch: renamed refs/heads/master to refs/heads/master-local
|
|
||||||
12d38e54cd419303587ba4613fb1194ec5c9d04f b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108482 +0200 pull --no-edit --ff-only origin master: Fast-forward
|
|
@ -1 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 b090d7f0029e74de260f7458721b8edd1e618edc CI <CI@example.com> 1654108479 +0200 fetch origin: storing head
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
x�ÍA
|
|
||||||
Â0@Q×9Å왉ÓI
|
|
||||||
"BW=FšL°Ð!R"èííÜ~üÜÌÖÄrê»* J®˜d £ÆÂ¬¥Dò‰jà…¯E¸¦<x—ÞýÙv˜f¸MóC?É^›^r³;�L9ŒpF�èŽzLºþÉ�}ëº)¹2ê,Ó
|
|
@ -1,2 +0,0 @@
|
|||||||
x�ŽA
|
|
||||||
à E»öîÅqÆD!”BV9†Ž#
Ä&ííëºúðyïóy¯um]Ú)¢m‚Ù�!–HXJÌ€Åö Á²ëÉ¢ŽxÊ«‹6£Gœ t~L‘†.$è£Òñ�
ßí¹Ÿz^ô4/ùÄzlrã½Þ5ŽÀxƒ¾kŒêm?ÕäO\ÕoY7Aõñ?:l
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
b090d7f0029e74de260f7458721b8edd1e618edc
|
|
@ -1 +0,0 @@
|
|||||||
b090d7f0029e74de260f7458721b8edd1e618edc
|
|
@ -1 +0,0 @@
|
|||||||
test1
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user