mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
support resetting to a commit in either soft, hard, or mixed mode
This commit is contained in:
parent
2746b1bd38
commit
5a0d0bb299
7 changed files with 64 additions and 6 deletions
|
@ -616,12 +616,12 @@ func TestGitCommandResetToCommit(t *testing.T) {
|
|||
gitCmd := NewDummyGitCommand()
|
||||
gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd {
|
||||
assert.EqualValues(t, "git", cmd)
|
||||
assert.EqualValues(t, []string{"reset", "78976bc"}, args)
|
||||
assert.EqualValues(t, []string{"reset", "--hard", "78976bc"}, args)
|
||||
|
||||
return exec.Command("echo")
|
||||
}
|
||||
|
||||
assert.NoError(t, gitCmd.ResetToCommit("78976bc"))
|
||||
assert.NoError(t, gitCmd.ResetToCommit("78976bc", "hard"))
|
||||
}
|
||||
|
||||
// TestGitCommandNewBranch is a function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue