allow rewording old commits

This commit is contained in:
Jesse Duffield 2022-01-09 13:36:07 +11:00
parent ee15202207
commit 0dfd02c42d
9 changed files with 61 additions and 71 deletions

View file

@ -24,9 +24,9 @@ func NewCommitCommands(
}
}
// RewordLastCommit renames the topmost commit with the given name
func (self *CommitCommands) RewordLastCommit(name string) error {
return self.cmd.New("git commit --allow-empty --amend --only -m " + self.cmd.Quote(name)).Run()
// RewordLastCommit rewords the topmost commit with the given message
func (self *CommitCommands) RewordLastCommit(message string) error {
return self.cmd.New("git commit --allow-empty --amend --only -m " + self.cmd.Quote(message)).Run()
}
// ResetToCommit reset to commit