summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Lundberg <peter.lundberg@soundtrackyourbrand.com>2019-04-07 14:25:17 +0200
committerJesse Duffield <jessedduffield@gmail.com>2019-04-10 17:17:31 +1000
commitfc3a57b5e2c18483acced264d811762cd79abfa1 (patch)
treeb00e749c984c24e149df7251c6c1799b9c732efa
parent7ff07e145474b1ef3465db94dd57c0aa82353bfb (diff)
Change expected sha for DiscardOldFileChanges
-rw-r--r--pkg/commands/git.go2
-rw-r--r--pkg/commands/git_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index e3fe4ba74..ae2281ee9 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -860,7 +860,7 @@ func (c *GitCommand) DiscardOldFileChanges(commits []*Commit, commitIndex int, f
return err
}
- cmd, err := c.PrepareInteractiveRebaseCommand(sha+"^", todo, true)
+ cmd, err := c.PrepareInteractiveRebaseCommand(sha, todo, true)
if err != nil {
return err
}
diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go
index 941fe6646..03e84d204 100644
--- a/pkg/commands/git_test.go
+++ b/pkg/commands/git_test.go
@@ -1817,7 +1817,7 @@ func TestGitCommandDiscardOldFileChanges(t *testing.T) {
"test999.txt",
test.CreateMockCommand(t, []*test.CommandSwapper{
{
- Expect: "git rebase --interactive --autostash 123456^",
+ Expect: "git rebase --interactive --autostash abcdef",
Replace: "echo",
},
{