Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(screens): fix history and project diff screens crashing on projects without a git dir #355

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/vgit/features/screens/HistoryScreen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ function HistoryScreen:show()
local buffer = Buffer(0)
local err = self.store:fetch(self.layout_type, buffer.filename)

loop.free_textlock()
if err then
console.debug.error(err).error(err)
return false
end

-- Show and bind data (data will have all the necessary shape required)
loop.free_textlock()
self.diff_view:define()
self.table_view:define()

Expand Down
1 change: 1 addition & 0 deletions lua/vgit/features/screens/ProjectDiffScreen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ function ProjectDiffScreen:show()
loop.free_textlock()
local err, data = self.store:fetch(self.layout_type)

loop.free_textlock()
if err then
console.debug.error(err).error(err)

Expand Down
Loading