mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-14 01:26:24 -04:00
use porcelain git rather than go-git for reset --hard HEAD because go-git takes over 5 seconds
This commit is contained in:
parent
1a6a69a8f1
commit
66512ca253
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue