mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-11-03 01:13:18 +03:00 
			
		
		
		
	safe reword
This commit is contained in:
		@@ -267,6 +267,10 @@ func (self *LocalCommitsController) rewordEditor(commit *models.Commit) error {
 | 
				
			|||||||
		return nil
 | 
							return nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return self.c.Ask(types.AskOpts{
 | 
				
			||||||
 | 
							Title:  self.c.Tr.RewordInEditorTitle,
 | 
				
			||||||
 | 
							Prompt: self.c.Tr.RewordInEditorPrompt,
 | 
				
			||||||
 | 
							HandleConfirm: func() error {
 | 
				
			||||||
			self.c.LogAction(self.c.Tr.Actions.RewordCommit)
 | 
								self.c.LogAction(self.c.Tr.Actions.RewordCommit)
 | 
				
			||||||
			subProcess, err := self.git.Rebase.RewordCommitInEditor(
 | 
								subProcess, err := self.git.Rebase.RewordCommitInEditor(
 | 
				
			||||||
				self.model.Commits, self.context().GetSelectedLineIdx(),
 | 
									self.model.Commits, self.context().GetSelectedLineIdx(),
 | 
				
			||||||
@@ -279,6 +283,8 @@ func (self *LocalCommitsController) rewordEditor(commit *models.Commit) error {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			return nil
 | 
								return nil
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (self *LocalCommitsController) drop(commit *models.Commit) error {
 | 
					func (self *LocalCommitsController) drop(commit *models.Commit) error {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -454,6 +454,8 @@ type TranslationSet struct {
 | 
				
			|||||||
	LcOpenCommitInBrowser               string
 | 
						LcOpenCommitInBrowser               string
 | 
				
			||||||
	LcViewBisectOptions                 string
 | 
						LcViewBisectOptions                 string
 | 
				
			||||||
	ConfirmRevertCommit                 string
 | 
						ConfirmRevertCommit                 string
 | 
				
			||||||
 | 
						RewordInEditorTitle                 string
 | 
				
			||||||
 | 
						RewordInEditorPrompt                string
 | 
				
			||||||
	Actions                             Actions
 | 
						Actions                             Actions
 | 
				
			||||||
	Bisect                              Bisect
 | 
						Bisect                              Bisect
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1027,6 +1029,9 @@ func EnglishTranslationSet() TranslationSet {
 | 
				
			|||||||
		LcOpenCommitInBrowser:               "open commit in browser",
 | 
							LcOpenCommitInBrowser:               "open commit in browser",
 | 
				
			||||||
		LcViewBisectOptions:                 "view bisect options",
 | 
							LcViewBisectOptions:                 "view bisect options",
 | 
				
			||||||
		ConfirmRevertCommit:                 "Are you sure you want to revert {{.selectedCommit}}?",
 | 
							ConfirmRevertCommit:                 "Are you sure you want to revert {{.selectedCommit}}?",
 | 
				
			||||||
 | 
							RewordInEditorTitle:                 "Reword in editor",
 | 
				
			||||||
 | 
							RewordInEditorPrompt:                "Are you sure you want to reword this commit in your editor?",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Actions: Actions{
 | 
							Actions: Actions{
 | 
				
			||||||
			// TODO: combine this with the original keybinding descriptions (those are all in lowercase atm)
 | 
								// TODO: combine this with the original keybinding descriptions (those are all in lowercase atm)
 | 
				
			||||||
			CheckoutCommit:                    "Checkout commit",
 | 
								CheckoutCommit:                    "Checkout commit",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user