diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-05 19:49:07 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-05 19:49:07 +1100 |
commit | 66512ca253b73c173196080ea0929e49a521b379 (patch) | |
tree | 9c1b9656601690403239f503230c2bd6186a27f5 | |
parent | 1a6a69a8f1f7c44978a384ba56321149f973223d (diff) |
use porcelain git rather than go-git for reset --hard HEAD because go-git takes over 5 seconds
-rw-r--r-- | pkg/commands/git.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 1d8e5a10d..e06b36d2e 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -208,9 +208,9 @@ func includesInt(list []int, a int) bool { return false } -// ResetHard does the equivalent of `git reset --hard HEAD` +// ResetHard clears the working tree to match HEAD func (c *GitCommand) ResetHard() error { - return c.Worktree.Reset(&gogit.ResetOptions{Mode: gogit.HardReset}) + return c.OSCommand.RunCommand("git reset --hard HEAD") } // UpstreamDifferenceCount checks how many pushables/pullables there are for the |