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

Empty content in diff buffer when trying to fetch from commit at random times #608

Open
GuillaumeLagrange opened this issue Sep 17, 2024 · 0 comments

Comments

@GuillaumeLagrange
Copy link
Collaborator

Issue Description

Type: bug report

Describe what happened (or what feature you want)

Sometimes, when reviewing a PR, the left diff is empty when it should not be.
I use local fs so right dif always comes from disk directly, but I suppose this could also happen for right diff.

This does not happen everytime, so I suspect some sort of race condition to be the root cause.

Describe what you expected to happen

The left diff buffer should show the content of the file at the base commit

How to reproduce it (as minimally and precisely as possible)

  1. (Not sure if mandatory) Use local fs
  2. Resume a PR review
  3. Sometimes, one of the files will be empty when it should not, not all the time, not always the same file, does not seem scoped to a single PR.

Tell us your environment

Nixos, nvim from unstable

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info

Anything else we need to know?

I dug a bit on this. I could not go further yet since I am quite unfamiliar with plenary and I could not find documentation.
utils.get_file_at_commit sometimes returns an empty array despite commit being present locally.

When I print output and stderr here, both tables are empty.

I also printed error code and signal (the second and third arg of the on_exit cb), 0 for both which seem normal.

Somehow, the output of git show rev:file from Plenary remains empty, which I have no idea why.

I will update the issue if I find anything else, right now the only workaround I found was to close the review buffers/restart nvim and re open the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant