1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-21 12:16:54 +02:00

Cleanup: remove pointless condition and error message

The file .git/info/exclude can't possibly show up in the files panel.
This commit is contained in:
Stefan Haller 2024-03-25 14:45:28 +01:00
parent 04fcb78c0c
commit c995e7ef2e
5 changed files with 0 additions and 9 deletions

View File

@ -617,10 +617,6 @@ func (self *FilesController) ignore(node *filetree.FileNode) error {
} }
func (self *FilesController) exclude(node *filetree.FileNode) error { func (self *FilesController) exclude(node *filetree.FileNode) error {
if node.GetPath() == ".git/info/exclude" {
return self.c.ErrorMsg(self.c.Tr.Actions.ExcludeFileErr)
}
if node.GetPath() == ".gitignore" { if node.GetPath() == ".gitignore" {
return self.c.ErrorMsg(self.c.Tr.Actions.ExcludeGitIgnoreErr) return self.c.ErrorMsg(self.c.Tr.Actions.ExcludeGitIgnoreErr)
} }

View File

@ -873,7 +873,6 @@ type Actions struct {
IgnoreExcludeFile string IgnoreExcludeFile string
IgnoreFileErr string IgnoreFileErr string
ExcludeFile string ExcludeFile string
ExcludeFileErr string
ExcludeGitIgnoreErr string ExcludeGitIgnoreErr string
Commit string Commit string
EditFile string EditFile string
@ -1796,7 +1795,6 @@ func EnglishTranslationSet() TranslationSet {
IgnoreExcludeFile: "Ignore or exclude file", IgnoreExcludeFile: "Ignore or exclude file",
IgnoreFileErr: "Cannot ignore .gitignore", IgnoreFileErr: "Cannot ignore .gitignore",
ExcludeFile: "Exclude file", ExcludeFile: "Exclude file",
ExcludeFileErr: "Cannot exclude .git/info/exclude",
ExcludeGitIgnoreErr: "Cannot exclude .gitignore", ExcludeGitIgnoreErr: "Cannot exclude .gitignore",
Commit: "Commit", Commit: "Commit",
EditFile: "Edit file", EditFile: "Edit file",

View File

@ -807,7 +807,6 @@ func polishTranslationSet() TranslationSet {
IgnoreExcludeFile: "Ignoruj lub wyklucz plik", IgnoreExcludeFile: "Ignoruj lub wyklucz plik",
IgnoreFileErr: "Nie można zignorować .gitignore", IgnoreFileErr: "Nie można zignorować .gitignore",
ExcludeFile: "Wyklucz plik", ExcludeFile: "Wyklucz plik",
ExcludeFileErr: "Nie można wykluczyć .git/info/exclude",
ExcludeGitIgnoreErr: "Nie można wykluczyć .gitignore", ExcludeGitIgnoreErr: "Nie można wykluczyć .gitignore",
Commit: "Commituj", Commit: "Commituj",
EditFile: "Edytuj plik", EditFile: "Edytuj plik",

View File

@ -599,7 +599,6 @@ func RussianTranslationSet() TranslationSet {
IgnoreExcludeFile: "Игнорировать или исключить файл", IgnoreExcludeFile: "Игнорировать или исключить файл",
IgnoreFileErr: "Невозможно игнорировать .gitignore", IgnoreFileErr: "Невозможно игнорировать .gitignore",
ExcludeFile: "Исключить файл", ExcludeFile: "Исключить файл",
ExcludeFileErr: "Невозможно исключить .git/info/exclude",
ExcludeGitIgnoreErr: "Невозможно исключить .gitignore", ExcludeGitIgnoreErr: "Невозможно исключить .gitignore",
Commit: "Коммит", Commit: "Коммит",
EditFile: "Редактировать файл", EditFile: "Редактировать файл",

View File

@ -667,7 +667,6 @@ func traditionalChineseTranslationSet() TranslationSet {
IgnoreExcludeFile: "忽略或排除檔案", IgnoreExcludeFile: "忽略或排除檔案",
IgnoreFileErr: "無法忽略 .gitignore 檔案", IgnoreFileErr: "無法忽略 .gitignore 檔案",
ExcludeFile: "排除檔案", ExcludeFile: "排除檔案",
ExcludeFileErr: "無法排除 .git/info/exclude 檔案",
ExcludeGitIgnoreErr: "無法排除 .gitignore 檔案", ExcludeGitIgnoreErr: "無法排除 .gitignore 檔案",
Commit: "提交", Commit: "提交",
EditFile: "編輯檔案", EditFile: "編輯檔案",