mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
fix could-not-access error
This commit is contained in:
committed by
Andrew Hynes
parent
ea09686770
commit
97ced9e14f
@ -241,7 +241,7 @@ func (self *WorkingTreeCommands) WorktreeFileDiffCmdObj(node models.IFile, plain
|
||||
if cached {
|
||||
cachedArg = " --cached"
|
||||
}
|
||||
if !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached {
|
||||
if !node.GetIsTracked() && !node.GetHasStagedChanges() && !cached && node.GetIsFile() {
|
||||
trackedArg = "--no-index -- /dev/null"
|
||||
}
|
||||
if plain {
|
||||
|
@ -29,6 +29,7 @@ type IFile interface {
|
||||
GetIsTracked() bool
|
||||
GetPath() string
|
||||
GetPreviousPath() string
|
||||
GetIsFile() bool
|
||||
}
|
||||
|
||||
func (f *File) IsRename() bool {
|
||||
@ -92,6 +93,10 @@ func (f *File) GetPreviousPath() string {
|
||||
return f.PreviousName
|
||||
}
|
||||
|
||||
func (f *File) GetIsFile() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
type StatusFields struct {
|
||||
HasStagedChanges bool
|
||||
HasUnstagedChanges bool
|
||||
|
Reference in New Issue
Block a user