mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Support range select removing files from a commit
This commit is contained in:
parent
beb730a9e6
commit
15d5261933
8 changed files with 190 additions and 50 deletions
|
@ -111,7 +111,7 @@ func TestRebaseDiscardOldFileChanges(t *testing.T) {
|
|||
gitConfigMockResponses map[string]string
|
||||
commits []*models.Commit
|
||||
commitIndex int
|
||||
fileName string
|
||||
fileName []string
|
||||
runner *oscommands.FakeCmdObjRunner
|
||||
test func(error)
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ func TestRebaseDiscardOldFileChanges(t *testing.T) {
|
|||
gitConfigMockResponses: nil,
|
||||
commits: []*models.Commit{},
|
||||
commitIndex: 0,
|
||||
fileName: "test999.txt",
|
||||
fileName: []string{"test999.txt"},
|
||||
runner: oscommands.NewFakeRunner(t),
|
||||
test: func(err error) {
|
||||
assert.Error(t, err)
|
||||
|
@ -133,7 +133,7 @@ func TestRebaseDiscardOldFileChanges(t *testing.T) {
|
|||
gitConfigMockResponses: map[string]string{"commit.gpgsign": "true"},
|
||||
commits: []*models.Commit{{Name: "commit", Sha: "123456"}},
|
||||
commitIndex: 0,
|
||||
fileName: "test999.txt",
|
||||
fileName: []string{"test999.txt"},
|
||||
runner: oscommands.NewFakeRunner(t),
|
||||
test: func(err error) {
|
||||
assert.Error(t, err)
|
||||
|
@ -147,7 +147,7 @@ func TestRebaseDiscardOldFileChanges(t *testing.T) {
|
|||
{Name: "commit2", Sha: "abcdef"},
|
||||
},
|
||||
commitIndex: 0,
|
||||
fileName: "test999.txt",
|
||||
fileName: []string{"test999.txt"},
|
||||
runner: oscommands.NewFakeRunner(t).
|
||||
ExpectGitArgs([]string{"rebase", "--interactive", "--autostash", "--keep-empty", "--no-autosquash", "--rebase-merges", "abcdef"}, "", nil).
|
||||
ExpectGitArgs([]string{"cat-file", "-e", "HEAD^:test999.txt"}, "", nil).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue