pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when cycling through changed files

bolt12 opened this issue · comments

Issue Description

Type: bug report

Describe what happened (or what feature you want)

When reviewing a PR and cycling through changed files with [q or ]q I get an error for some particular files.

Before pressing ]q:
image

after:

image

Describe what you expected to happen

It should go to the next changed file without an error

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

  1. review: IntersectMBO/ouroboros-network#4644
  2. cycle through changed files
  3. error

I have the same problem. I've found that running git diff manually with the commit range that octo uses for the commit to review returns an error like so:

$ git diff a6ca7c6..fa4aef9
fatal: ambiguous argument 'a6ca7c6..fa4aef9': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

So this is likely what is causing your problem too.

Actually I think I now what the problem is.

After just running git pull locally and then re-running :Octo review commit and selecting the commit that was failing before it now successfully views it without throwing up any error.

So you need to make sure your local copy of the PR branch is up to date with the remote one it seems.