mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message prompt. I've had to update other uses of that prompt to allow the summary and description labels to be passed in
This commit is contained in:
parent
b284970bac
commit
7807b40322
27 changed files with 212 additions and 190 deletions
|
@ -99,19 +99,19 @@ func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage strin
|
|||
|
||||
return self.commitsHelper.OpenCommitMessagePanel(
|
||||
&OpenCommitMessagePanelOpts{
|
||||
CommitIndex: context.NoCommitIndex,
|
||||
InitialMessage: initialMessage,
|
||||
Title: self.c.Tr.CommitSummary,
|
||||
PreserveMessage: true,
|
||||
OnConfirm: self.handleCommit,
|
||||
CommitIndex: context.NoCommitIndex,
|
||||
InitialMessage: initialMessage,
|
||||
SummaryTitle: self.c.Tr.CommitSummaryTitle,
|
||||
DescriptionTitle: self.c.Tr.CommitDescriptionTitle,
|
||||
PreserveMessage: true,
|
||||
OnConfirm: self.handleCommit,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
func (self *WorkingTreeHelper) handleCommit(message string) error {
|
||||
cmdObj := self.c.Git().Commit.CommitCmdObj(message)
|
||||
func (self *WorkingTreeHelper) handleCommit(summary string, description string) error {
|
||||
cmdObj := self.c.Git().Commit.CommitCmdObj(summary, description)
|
||||
self.c.LogAction(self.c.Tr.Actions.Commit)
|
||||
_ = self.commitsHelper.PopCommitMessageContexts()
|
||||
return self.gpgHelper.WithGpgHandling(cmdObj, self.c.Tr.CommittingStatus, func() error {
|
||||
self.commitsHelper.OnCommitSuccess()
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue