vscode-pull-request-github
vscode-pull-request-github copied to clipboard
fatal: shallow file has changed since we read it . Please check git output for more details
Why was this closed invalid? I am seeing this error also but have no idea what it's trying to tell me.
Can you share a screen shot of where you see this error as well as the git output?
It was showing up on the bottom right in a standard notification popup. It seems to be happening when I try to check out a PR into review mode. Review mode is never started. This is all specific to a particular repo. Review mode works in other repos.
Git output when I click the Checkout button on PR Description tab:
[2022-04-22T11:52:17.200Z] > git ls-tree -l b91ee1e920f5d5bad16ae29130eb9d19e8d1d55c -- Jenkinsfile [3ms]
[2022-04-22T11:52:23.980Z] > git config --local -l [1ms]
[2022-04-22T11:52:24.064Z] > git symbolic-ref --short HEAD [2ms]
[2022-04-22T11:52:24.086Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/corci-1162a refs/remotes/corci-1162a [4ms]
[2022-04-22T11:52:24.128Z] > git remote --verbose [3ms]
[2022-04-22T11:52:24.129Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [22ms]
[2022-04-22T11:52:24.154Z] > git config --get commit.template [2ms]
[2022-04-22T11:52:24.213Z] > git checkout -q corci-1162a [42ms]
[2022-04-22T11:52:24.265Z] > git symbolic-ref --short HEAD [2ms]
[2022-04-22T11:52:24.286Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/corci-1162a refs/remotes/corci-1162a [3ms]
[2022-04-22T11:52:24.323Z] > git remote --verbose [2ms]
[2022-04-22T11:52:24.328Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [24ms]
[2022-04-22T11:52:24.353Z] > git config --get commit.template [2ms]
[2022-04-22T11:52:25.072Z] > git fetch origin refs/heads/corci-1162a [703ms]
[2022-04-22T11:52:25.072Z] From github.com:daos-stack/daos
* branch corci-1162a -> FETCH_HEAD
[2022-04-22T11:52:25.124Z] > git symbolic-ref --short HEAD [2ms]
[2022-04-22T11:52:25.141Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/corci-1162a refs/remotes/corci-1162a [2ms]
[2022-04-22T11:52:25.175Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [19ms]
[2022-04-22T11:52:25.181Z] > git remote --verbose [7ms]
[2022-04-22T11:52:25.201Z] > git config --get commit.template [2ms]
[2022-04-22T11:52:25.222Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/corci-1162a refs/remotes/corci-1162a [3ms]
[2022-04-22T11:52:25.280Z] > git symbolic-ref --short HEAD [2ms]
[2022-04-22T11:52:25.298Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/corci-1162a refs/remotes/corci-1162a [3ms]
[2022-04-22T11:52:25.334Z] > git remote --verbose [3ms]
[2022-04-22T11:52:25.336Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [20ms]
[2022-04-22T11:52:25.362Z] > git config --get commit.template [2ms]
And review mode is not active after that. In this particular repo.
Thanks. I don't see the error in the git output, so it's no clear where it's happening. Is the error in the git output, but just no part of the section that you shared?
No. I have not seen it in git output.
But ultimately, it seems to be a symptom of the greater problem which is that in this one repo, I cannot Checkout and get into review mode. Maybe if we figure out the cause of that, this issue will go away with the solution.
I agree. Are you able to checkout other branches via the command line?
Note that I am checking out PRs, not branches (directly). To be clear I navigate to the "Github" plugin->Waiting For My Review and choose a PR. I then click on the PR's Description and click the Checkout button on the top right.
In other repos that action automatically switches me to the Github Pull Request plugin in review mode on the PR. In this one repo that switch to review mode is not happening.
Note that I am checking out PRs, not branches (directly). To be clear I navigate to the "Github" plugin->Waiting For My Review and choose a PR. I then click on the PR's Description and click the Checkout button on the top right.
Behind the scenes, checking out a a PR is the same as checking out a branch. I am curious if you get the same error when just checking out a branch too.
Behind the scenes, checking out a a PR is the same as checking out a branch.
Indeed. I did understand that. I just wanted to make sure you were clear on what my workflow was in producing this.
I am curious if you get the same error when just checking out a branch too.
I switch branches all of the time.
But even trying to Checkout doesn't seem to be producing the error any more. It's just not working as it does in other repos, automatically switching to the Github Pull Request extension in review mode on the checked out PR. It does check out the PR/branch. It just doesn't open the Pull Request extension in review mode.
It does check out the PR/branch. It just doesn't open the Pull Request extension in review mode.
In that case, can you reproduce the issue then share the output of "GitHub Pull Request"?
[Info] Review> switch to Pull Request #8821 - start
[Info] PullRequestGitHelper> Branch origin/shilongw/DAOS-10233 doesn't exist on local disk yet.
[Info] PullRequestGitHelper> Fetch tracked branch refs/remotes/origin/shilongw/DAOS-10233
[Info] PullRequestGitHelper> associate shilongw/DAOS-10233 with Pull Request #8821
[Info] Review> Review> switch to Pull Request #8821 - done
[Info] Review> Queuing additional validate state
At this point, VS Code is still in the Github extension and on the PR description. It did not switch to the Github Pull Request extension in review mode. If I manually switch to that extension, it's in review mode but for some other PR.
it's in review mode but for some other PR.
Have you used branch shilongw/DAOS-10233
for a different PR before?
No. But this is not unique to that branch. It happens on any branch I try to check out for review, whether I have tried it before or not.
The output from a Checkout on a repo that does operate correctly:
[Info] Review> switch to Pull Request #21 - start
[Info] Review> Review> switch to Pull Request #21 - done
[Info] Review> Queuing additional validate state
[Info] Review> Validating state...
[Info] Found GitHub remote
[Info] Review> current branch shilongw/fix_build_el7 is associated with pull request #21
[Info] Review> Resolving pull request
[Info] Review> Fetching pull request data
[Info] Review> register comments provider
[Info] Review> display pull request status bar indicator and refresh pull request tree view.
[Info] Review> using focus mode = true.
[Info] Review> state validation silent = false.
[Info] Review> PR show should show = false.
[Info] GitContentFileSystemProvider> Getting repository (file:///home/brian/daos/rpm/dpdk) content for commit afb21ed7de520cd8657ff87eca5b0d932aa436dc and path /home/brian/daos/rpm/dpdk/Jenkinsfile
Any more progress we can make here?
There are no errors in the GitHub Pull Request log, so no clues yet there. Can you open the developer tools (command "Developer: Toggle Developer Tools") and share any errors you see in the console there?
Developer tools console log after trying to check out a PR.
There is a lot of noise at the start. The end of the log is the result of trying to do a checkout.
Thanks @brianjmurrell. Based on the logs, the "Pull Request" view, which is supposed to open when you checkout a PR is not able to be registered properly. Does your workspace have multiple folders with GitHub repos in it?
Does your workspace have multiple folders with GitHub repos in it?
Indeed it does.
Ok, I've opened a new issue for that since it's not related to the shallow error: https://github.com/microsoft/vscode-pull-request-github/issues/3515
Awesome, thanks @alexr00! I have subscribed to #3515.
@youngjuning Can you share a screen shot of where you see this error as well as the git output?
Closing because of missing info.