mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Disallow cherry-picking merge commits
This commit is contained in:
parent
2c82b3f8dd
commit
bc6616d511
2 changed files with 6 additions and 0 deletions
|
@ -298,6 +298,10 @@ func (self *BasicCommitsController) canCopyCommits(selectedCommits []*models.Com
|
||||||
if commit.Sha == "" {
|
if commit.Sha == "" {
|
||||||
return &types.DisabledReason{Text: self.c.Tr.CannotCherryPickNonCommit, ShowErrorInPanel: true}
|
return &types.DisabledReason{Text: self.c.Tr.CannotCherryPickNonCommit, ShowErrorInPanel: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if commit.IsMerge() {
|
||||||
|
return &types.DisabledReason{Text: self.c.Tr.CannotCherryPickMergeCommit, ShowErrorInPanel: true}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -303,6 +303,7 @@ type TranslationSet struct {
|
||||||
SureCherryPick string
|
SureCherryPick string
|
||||||
CherryPick string
|
CherryPick string
|
||||||
CannotCherryPickNonCommit string
|
CannotCherryPickNonCommit string
|
||||||
|
CannotCherryPickMergeCommit string
|
||||||
Donate string
|
Donate string
|
||||||
AskQuestion string
|
AskQuestion string
|
||||||
PrevLine string
|
PrevLine string
|
||||||
|
@ -1244,6 +1245,7 @@ func EnglishTranslationSet() TranslationSet {
|
||||||
SureCherryPick: "Are you sure you want to cherry-pick the copied commits onto this branch?",
|
SureCherryPick: "Are you sure you want to cherry-pick the copied commits onto this branch?",
|
||||||
CherryPick: "Cherry-pick",
|
CherryPick: "Cherry-pick",
|
||||||
CannotCherryPickNonCommit: "Cannot cherry-pick this kind of todo item",
|
CannotCherryPickNonCommit: "Cannot cherry-pick this kind of todo item",
|
||||||
|
CannotCherryPickMergeCommit: "Cherry-picking merge commits is not supported",
|
||||||
Donate: "Donate",
|
Donate: "Donate",
|
||||||
AskQuestion: "Ask Question",
|
AskQuestion: "Ask Question",
|
||||||
PrevLine: "Select previous line",
|
PrevLine: "Select previous line",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue