Skip to content

Add option to turn off prompt on commit reword in editor #2033

@Tej12345

Description

@Tej12345

I would like to have an option to disable prompt:
"Are you sure you want to reword this commit in your editor"
It's really annoying when you reword like 50 commits.
Code hints:
RewordInEditorPrompt

func (self *LocalCommitsController) rewordEditor(commit *models.Commit) error {
	applied, err := self.handleMidRebaseCommand("reword", commit)
	if err != nil {
		return err
	}
	if applied {
		return nil
	}

	return self.c.Confirm(types.ConfirmOpts{
		Title:  self.c.Tr.RewordInEditorTitle,
		Prompt: self.c.Tr.RewordInEditorPrompt,
		HandleConfirm: func() error {
			self.c.LogAction(self.c.Tr.Actions.RewordCommit)
			subProcess, err := self.git.Rebase.RewordCommitInEditor(
				self.model.Commits, self.context().GetSelectedLineIdx(),
			)
			if err != nil {
				return self.c.Error(err)
			}
			if subProcess != nil {
				return self.c.RunSubprocessAndRefresh(subProcess)
			}

			return nil
		},
	})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions