summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-04-02 19:53:16 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-05-06 22:44:38 +1000
commit5a0d0bb299eb2e4d693d3ecab506cc154e97678a (patch)
tree8c916afb93e7b5cae75b56c3c1431efa452dc29f /pkg/commands/git.go
parent2746b1bd38fa2668490a8db2369dec5146fbaec6 (diff)
support resetting to a commit in either soft, hard, or mixed mode
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 64f3cd4b1..159c88cca 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -277,8 +277,8 @@ func (c *GitCommand) Fetch(unamePassQuestion func(string) string, canAskForCrede
}
// ResetToCommit reset to commit
-func (c *GitCommand) ResetToCommit(sha string) error {
- return c.OSCommand.RunCommand(fmt.Sprintf("git reset %s", sha))
+func (c *GitCommand) ResetToCommit(sha string, strength string) error {
+ return c.OSCommand.RunCommand(fmt.Sprintf("git reset --%s %s", strength, sha))
}
// NewBranch create new branch