Compare commits
4 Commits
create-pul
...
waiting-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b4cceddb1 | ||
|
|
4991ff4078 | ||
|
|
50aa7e7764 | ||
|
|
b16013fde1 |
@@ -409,21 +409,19 @@ func (self *LocalCommitsController) switchFromCommitMessagePanelToEditor(filepat
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) handleReword(summary string, description string) error {
|
||||
var err error
|
||||
|
||||
if models.IsHeadCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx()) {
|
||||
// we've selected the top commit so no rebase is required
|
||||
err = self.c.Helpers().GPG.WithGpgHandling(self.c.Git().Commit.RewordLastCommit(summary, description),
|
||||
self.c.Tr.CommittingStatus, nil)
|
||||
} else {
|
||||
err = self.c.Git().Rebase.RewordCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx(), summary, description)
|
||||
return self.c.Helpers().GPG.WithGpgHandling(self.c.Git().Commit.RewordLastCommit(summary, description),
|
||||
self.c.Tr.RewordingStatus, nil)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
self.c.Helpers().Commits.OnCommitSuccess()
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||
return self.c.WithWaitingStatus(self.c.Tr.RewordingStatus, func(gocui.Task) error {
|
||||
err := self.c.Git().Rebase.RewordCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx(), summary, description)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||
})
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) doRewordEditor() error {
|
||||
|
||||
@@ -384,6 +384,7 @@ type TranslationSet struct {
|
||||
RedoingStatus string
|
||||
CheckingOutStatus string
|
||||
CommittingStatus string
|
||||
RewordingStatus string
|
||||
RevertingStatus string
|
||||
CreatingFixupCommitStatus string
|
||||
CommitFiles string
|
||||
@@ -1425,6 +1426,7 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
RedoingStatus: "Redoing",
|
||||
CheckingOutStatus: "Checking out",
|
||||
CommittingStatus: "Committing",
|
||||
RewordingStatus: "Rewording",
|
||||
RevertingStatus: "Reverting",
|
||||
CreatingFixupCommitStatus: "Creating fixup commit",
|
||||
CommitFiles: "Commit files",
|
||||
|
||||
Reference in New Issue
Block a user