DonJayamanne / gitHistoryVSCode

Git History for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
MIT License
963 stars 155 forks source link

[BUG] File History and Line History not working on repositories with multiple remotes #761

Closed jmevel closed 9 months ago

jmevel commented 9 months ago

Describe the Bug

When working on repositories with multiple remotes both Git: View File History and Git: View Line History commands do nothing. This is an issue on forks when one would want to keep their version up-to-date with the repository the fork will eventually be merged into. In that case we add a second remote and we rebase the latest history onto the branch of our fork we are working on.

Steps To Reproduce

  1. Fork any git repository
  2. On the forked repository, add the original repository as a second remote: git remote add upstream https://github.com/original-repo/goes-here.git
  3. Open your fork in VS Code
  4. Open the Output (Ctrl + Shift + U) and select Git History in the dropdown
  5. Open any file
  6. Open the command palette (Ctrl + Shift + P)
  7. Run the Git: View File History or the Git: View Line History command

Expected Behavior

Actual Behavior

Environment

jmevel commented 9 months ago

So... I'm actually closing this ticket.

I thought multiple remotes was the root cause but it actually seems not. I still don't understand what is causing the issue on my repository then. It's working well on any other project I'm working on (all of them have a single origin remote).

But I tried to do the Steps To Reproduce and it's working...

EDIT: and now all of a sudden it works on the repository I had this issue. I did NOT modify any file, 1 minute ago it still wasn't working 🤔

May be related to #715