mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +03:00
Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments Mandate that args must be passed when building a command Now you need to provide an args array when building a command. There are a handful of places where we need to deal with a string, such as with user-defined custom commands, and for those we now require that at the callsite they use str.ToArgv to do that. I don't want to provide a method out of the box for it because I want to discourage its use. For some reason we were invoking a command through a shell when amending a commit, and I don't believe we needed to do that as there was nothing user- supplied about the command. So I've switched to using a regular command out- side the shell there
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Start a git bisect to find a bad commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Opening lazygit when bisect has been started from another branch. There's an issue where we don't reselect the current branch if we mark the current branch as bad so this test side-steps that problem",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
@@ -15,7 +15,7 @@ var FromOtherBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
NewBranch("other").
|
||||
CreateNCommits(10).
|
||||
Checkout("master").
|
||||
RunCommand("git bisect start other~2 other~5")
|
||||
StartBisect("other~2", "other~5")
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CheckoutByName = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Try to checkout branch by name. Verify that it also works on the branch with the special name @.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CreateTag = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Create a new tag on branch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Delete = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Try to delete the checked out branch first (to no avail), and then delete another branch.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DetachedHead = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Create a new branch on detached head",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var OpenWithCliArg = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Open straight to branches panel using a CLI arg",
|
||||
ExtraCmdArgs: "branch",
|
||||
ExtraCmdArgs: []string{"branch"},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var RebaseAndDrop = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase onto another branch, deal with the conflicts. Also mark a commit to be dropped before continuing.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var RebaseDoesNotAutosquash = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rebase a branch that has fixups onto another branch, and verify that the fixups are not squashed even if rebase.autoSquash is enabled globally.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Reset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Hard reset to another branch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var ResetUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Reset the upstream of a branch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SetUpstream = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Set the upstream of a branch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Suggestions = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Checking out a branch with name suggestions",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick commits from the subcommits view, without conflicts",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cherry pick commits from the subcommits view, with conflicts",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Amend = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends the last commit from the files panel",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Commit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files and committing",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CommitMultiline = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Commit with a multi-line commit message",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CommitWipWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Commit with skip hook and config commitPrefix is defined. Prefix is ignored when creating WIP commits.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(testConfig *config.AppConfig) {
|
||||
testConfig.UserConfig.Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CommitWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Commit with defined config commitPrefix",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(testConfig *config.AppConfig) {
|
||||
testConfig.UserConfig.Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CreateTag = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Create a new tag on a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DiscardOldFileChange = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Discarding a single file from an old commit (does rebase in background to remove the file but retain the other one)",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var History = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Cycling through commit message history in the commit message panel",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var HistoryComplex = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "More complex flow for cycling commit message history",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Creating a new branch from a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var ResetAuthor = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Reset author on a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Revert = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Reverts a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var RevertMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Reverts a merge commit and chooses to revert to the parent commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Reword = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files and committing",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Search = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Search for a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SetAuthor = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Set author on a commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var StageRangeOfLines = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a range of lines",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Staged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files, going in the staged files menu, unstaging a line then committing",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files, going in the staged files menu, unstaging a line then committing without pre-commit hooks",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files, going in the unstaged files menu, staging a line and committing",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var RemoteNamedStar = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Having a config remote.*",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var Filter = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Ensures that when there are merge conflicts, the files panel only shows conflicted files",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var ResolveExternally = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Ensures that when merge conflicts are resolved outside of lazygit, lazygit prompts you to continue",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var ResolveMultipleFiles = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Ensures that upon resolving conflicts for one file, the next file is selected",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var UndoChooseHunk = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Chooses a hunk when resolving a merge conflict and then undoes the choice",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var BasicCmdAtRuntime = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command provided at runtime to create a new file",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var BasicCmdFromConfig = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command to create a new file",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
|
@@ -0,0 +1,35 @@
|
||||
package custom_commands
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var ComplexCmdAtRuntime = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command provided at runtime to create a new file, via a shell command. We invoke custom commands through a shell already. This test proves that we can run a shell within a shell, which requires complex escaping.",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Files().
|
||||
IsEmpty().
|
||||
IsFocused().
|
||||
Press(keys.Universal.ExecuteCustomCommand)
|
||||
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom Command:")).
|
||||
Type("sh -c \"touch file.txt\"").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Files.RefreshFiles)
|
||||
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("file.txt"),
|
||||
)
|
||||
},
|
||||
})
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command reffering prompt responses by name",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using menuFromCommand prompt type",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using prompt response in menuFromCommand entries",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Using a custom command with multiple prompts",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var OmitFromHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Omitting a runtime custom command from history if it begins with space",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("blah")
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Diff = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "View the diff of two branches, then view the reverse diff",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DiffAndApplyPatch = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Create a patch from the diff between two branches and apply the patch.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DiffCommits = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "View the diff between two commits",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -13,7 +13,7 @@ var (
|
||||
|
||||
var IgnoreWhitespace = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Toggle whitespace in the diff",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
var DirWithUntrackedFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
// notably, we currently _don't_ actually see the untracked file in the diff. Not sure how to get around that.
|
||||
Description: "When selecting a directory that contains an untracked file, we should not get an error",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DiscardChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Discarding all possible permutations of changed files",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: true, // failing due to index.lock file being created
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
@@ -51,7 +51,7 @@ var DiscardChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
shell.RunShellCommand(`rm deleted-us.txt && git add deleted-us.txt`)
|
||||
shell.RunShellCommand(`git commit -m "three"`)
|
||||
shell.RunShellCommand(`git reset --hard conflict_second`)
|
||||
shell.RunShellCommandExpectError(`git merge conflict`)
|
||||
shell.RunCommandExpectError([]string{"git", "merge", "conflict"})
|
||||
|
||||
shell.RunShellCommand(`echo "new" > new.txt`)
|
||||
shell.RunShellCommand(`echo "new staged" > new-staged.txt && git add new-staged.txt`)
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DiscardStagedChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Discarding staged changes",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Gitignore = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Verify that we can't ignore the .gitignore file, then ignore/exclude other files",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -14,13 +14,13 @@ fi
|
||||
|
||||
var RememberCommitMessageAfterFail = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Verify that the commit message is remembered after a failed attempt at committing",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CreateFile(".git/hooks/pre-commit", preCommitHook)
|
||||
shell.RunCommand("chmod +x .git/hooks/pre-commit")
|
||||
shell.MakeExecutable(".git/hooks/pre-commit")
|
||||
|
||||
shell.CreateFileAndAdd("one", "one")
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CliArg = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Filter commits by file path, using CLI arg",
|
||||
ExtraCmdArgs: "-f filterFile",
|
||||
ExtraCmdArgs: []string{"-f", "filterFile"},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SelectFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Filter commits by file path, by finding file in UI and filtering on it",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var TypeFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Filter commits by file path, by finding file in UI and filtering on it",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -16,7 +16,7 @@ const (
|
||||
|
||||
var AdvancedInteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "It begins an interactive rebase and verifies to have the possibility of editing the commits of the branch before proceeding with the actual rebase",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var AmendFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends a staged file to the first (initial) commit.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var AmendFixupCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends a staged file to a fixup commit, and checks that other unrelated fixup commits are not auto-squashed.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var AmendHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends the current head commit from the commits panel during a rebase.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -12,7 +12,7 @@ var (
|
||||
|
||||
var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends a staged file to a merge commit.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var AmendNonHeadCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Tries to amend a commit that is not the head while already rebasing, resulting in an error message",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var DropTodoCommitWithUpdateRefShowBranchHeads = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Drops a commit during interactive rebase when there is an update-ref in the git-rebase-todo file (with experimentalShowBranchHeads on)",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.38.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var EditFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Edits the first commit, just to show that it's possible",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var EditNonTodoCommitDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Tries to edit a non-todo commit while already rebasing, resulting in an error message",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var FixupFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Tries to fixup the first commit, which results in an error message",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var FixupSecondCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Fixup the second commit into the first (initial)",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Move = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Directly move a commit all the way down and all the way back up",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveInRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Via a single interactive rebase move a commit all the way up then back down then slightly back up again and apply the change",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Rebase = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Begins an interactive rebase, then fixups, drops, and squashes some commits",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
var RewordFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rewords the first commit, just to show that it's possible",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var RewordLastCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rewords the last (HEAD) commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var RewordYouAreHereCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rewords the current HEAD commit in an interactive rebase",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var RewordYouAreHereCommitWithEditor = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Rewords the current HEAD commit in an interactive rebase with editor",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SquashDownFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Tries to squash down the first commit, which results in an error message",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SquashDownSecondCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Squash down the second commit into the first (initial)",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SquashFixupsAboveFirstCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Squashes all fixups above the first (initial) commit.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SwapInRebaseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Via an edit-triggered rebase, swap two commits, causing a conflict. Then resolve the conflict and continue",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var SwapWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Directly swap two commits, causing a conflict. Then resolve the conflict and continue",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var ConfirmOnQuit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Quitting with a confirm prompt",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.UserConfig.ConfirmOnQuit = true
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Confirms a popup appears on first opening Lazygit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.UserConfig.DisableStartupPopups = false
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var Apply = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Apply a custom patch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var ApplyInReverse = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Apply a custom patch in reverse",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var ApplyInReverseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Apply a custom patch in reverse, resulting in a conflict",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var CopyPatchToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Create a patch from the commits and copy the patch to clipbaord.",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: true, // skipping because CI doesn't have clipboard functionality
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToEarlierCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to an earlier commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
GitVersion: AtLeast("2.26.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToEarlierCommitNoKeepEmpty = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to an earlier commit, for older git versions that don't keep the empty commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
GitVersion: Before("2.26.0"),
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToIndex = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to the index",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToIndexPartOfAdjacentAddedLines = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to the index, with only some lines of a range of adjacent added lines in the patch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToIndexPartial = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to the index. This is different from the MoveToIndex test in that we're only selecting a partial patch from a file",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToIndexWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to the index, causing a conflict",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToLaterCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to a later commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToLaterCommitPartialHunk = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to a later commit, with only parts of a hunk in the patch",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var MoveToNewCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Move a patch from a commit to a new commit",
|
||||
ExtraCmdArgs: "",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user