mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-14 11:02:27 +03:00
dont panic when catting directories
This commit is contained in:
@ -86,16 +86,17 @@ func (c *GitCommand) GetStatusFiles() []File {
|
||||
change := statusString[0:2]
|
||||
stagedChange := change[0:1]
|
||||
unstagedChange := statusString[1:2]
|
||||
filename := statusString[3:]
|
||||
filename := c.OSCommand.Unquote(statusString[3:])
|
||||
tracked := !includes([]string{"??", "A ", "AM"}, change)
|
||||
file := File{
|
||||
Name: c.OSCommand.Unquote(filename),
|
||||
Name: filename,
|
||||
DisplayString: statusString,
|
||||
HasStagedChanges: !includes([]string{" ", "U", "?"}, stagedChange),
|
||||
HasUnstagedChanges: unstagedChange != " ",
|
||||
Tracked: tracked,
|
||||
Deleted: unstagedChange == "D" || stagedChange == "D",
|
||||
HasMergeConflicts: change == "UU",
|
||||
Type: c.OSCommand.FileType(filename),
|
||||
}
|
||||
files = append(files, file)
|
||||
}
|
||||
|
Reference in New Issue
Block a user