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 source control panel using scm.experimental.showHistoryGraph #219953

Closed
BriceBoy opened this issue Jul 4, 2024 · 23 comments
Closed

Empty source control panel using scm.experimental.showHistoryGraph #219953

BriceBoy opened this issue Jul 4, 2024 · 23 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues verified Verification succeeded
Milestone

Comments

@BriceBoy
Copy link

BriceBoy commented Jul 4, 2024

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: Version : 1.91.0 (user setup)
  • OS Version: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. Turn on scm.experimental.showHistoryGraph
  2. Open another editor
  3. Create modifications to populate source control pending modifications
    --> Source control shows 'X' modifications pending on icon but is emtpy
@BriceBoy
Copy link
Author

BriceBoy commented Jul 4, 2024

Moreover :

  • I turned option off to see modifications again
  • I then turned it on again
  • I reloaded window
  • I added modifications
  • I added commit message
  • I clicked Validation button
    --> Validation button is still blue and changes still visible even if commit is already staged:
    image

@lszomoru
Copy link
Member

lszomoru commented Jul 4, 2024

/gifPlease

@lszomoru lszomoru added the scm General SCM compound issues label Jul 4, 2024
@vscodenpa
Copy link

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

@vscodenpa vscodenpa added the info-needed Issue requires more information from poster label Jul 4, 2024
@BriceBoy
Copy link
Author

BriceBoy commented Jul 5, 2024

I'm not able to reproduce it but if I ever encounter it I'll post a screenshot. I can still make a little photo montage to try explaining better my problem.
If I can remember well it was like this (I saw badge notification because I had modifications pending but could not do anything to it as they won't show up in the menu)

image

@lszomoru
Copy link
Member

lszomoru commented Jul 5, 2024

Thanks for the update. If you are able to reproduce the issue again, I would love to get additional information to investigate this. Thanks!

@rdev32
Copy link

rdev32 commented Jul 7, 2024

hi there, this is the expected behaviour when you enable "scm.experimental.showHistoryGraph": true,

image

but as @BriceBoy said.. nothing happens. The file view is still same

@lszomoru
Copy link
Member

lszomoru commented Jul 8, 2024

When this happens, can you please check the developer console that you can enable using "Developer: Toggle Developer Tools" command in the command palette. It would also be helpful if you could also share the contents of the git output window. Thanks!

@Fydon
Copy link

Fydon commented Jul 8, 2024

When using Remote SSH and scm.experimental.showHistoryGraph is on, I see a blank section where staged changes and changes should show. Turning scm.experimental.showHistoryGraph off immediately results in the panel displaying staged changes and changes.

Turning scm.experimental.showHistoryGraph back on does not immediately result in it going blank again, but running Reload Window results in a blank panel again.

Developer Tools console:

  ERR Failed to execute git: Error: Failed to execute git
    at t.Git._exec (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:909662)
    at t.Git.exec (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:908730)
    at N.exec (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:914233)
    at N.log (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:915314)
    at T.retryRun (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:1030359)
    at T.run (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:1029963)
    at t.GitHistoryProvider.provideHistoryItems2 (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/extensions/git/dist/main.js:2:942953)
    at F.$provideHistoryItems2 (/home/ubuntu/.vscode-server-insiders/cli/servers/Insiders-b23e791eb5afbd95f05aa24da7693ce89344a079/server/out/vs/workbench/api/node/extensionHostProcess.js:156:195052)

Git

2024-07-08 19:53:12.694 [info] [main] Log level: Info
2024-07-08 19:53:12.694 [info] [main] Validating found git in: "git"
2024-07-08 19:53:12.694 [info] [main] Using git "2.34.1" from "git"
2024-07-08 19:53:12.694 [info] [Model][doInitialScan] Initial repository scan started
2024-07-08 19:53:12.694 [info] > git rev-parse --show-toplevel [13ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --path-format=relative --show-toplevel [1ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --git-dir --git-common-dir [2ms]
2024-07-08 19:53:12.694 [info] [Model][openRepository] Opened repository: /var/www/html/folder
2024-07-08 19:53:12.694 [info] > git config --get commit.template [1ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --show-toplevel [6ms]
2024-07-08 19:53:12.694 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [7ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --path-format=relative --show-toplevel [7ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --show-toplevel [2ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --path-format=relative --show-toplevel [2ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --show-toplevel [2ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --path-format=relative --show-toplevel [2ms]
2024-07-08 19:53:12.694 [info] > git status -z -uall [25ms]
2024-07-08 19:53:12.694 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [11ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --show-toplevel [23ms]
2024-07-08 19:53:12.694 [info] > git config --local branch.production.vscode-merge-base [6ms]
2024-07-08 19:53:12.694 [info] > git config --get commit.template [16ms]
2024-07-08 19:53:12.694 [info] > git fetch --prune [90ms]
2024-07-08 19:53:12.694 [info] [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2024-07-08 19:53:12.694 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/origin/master refs/remotes/origin/master [22ms]
2024-07-08 19:53:12.694 [info] > git rev-parse --path-format=relative --show-toplevel [33ms]
2024-07-08 19:53:12.694 [info] [Model][doInitialScan] Initial repository scan completed - repositories(1), closed repositories (0), parent repositories (0), unsafe repositories (0)
2024-07-08 19:53:12.695 [info] > git merge-base refs/heads/production refs/remotes/origin/production [9ms]
2024-07-08 19:53:12.695 [info] > git config --get commit.template [19ms]
2024-07-08 19:53:12.695 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [6ms]
2024-07-08 19:53:12.695 [info] > git rev-list --count --left-right refs/heads/production...refs/remotes/origin/production [5ms]
2024-07-08 19:53:12.695 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [6ms]
2024-07-08 19:53:12.695 [info] > git diff --name-status -z --diff-filter=ADMR effe360b22bf05499cb08c76d55cf36f3a3c553e...refs/remotes/origin/production [2ms]
2024-07-08 19:53:12.695 [info] > git status -z -uall [19ms]
2024-07-08 19:53:12.695 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [2ms]
2024-07-08 19:53:12.695 [info] > git config --local branch.production.vscode-merge-base [1ms]
2024-07-08 19:53:12.695 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/origin/master refs/remotes/origin/master [1ms]
2024-07-08 19:53:12.695 [info] > git merge-base --octopus refs/remotes/origin/master refs/heads/production refs/remotes/origin/production [33ms]
2024-07-08 19:53:12.695 [info] > git log --format=%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B -z --shortstat --diff-merges=first-parent 90bdbed3a41478cb6974912069938c41a87eb4ec^.. --topo-order --decorate=full refs/heads/production refs/remotes/origin/production refs/remotes/origin/master [4ms]
2024-07-08 19:53:12.695 [info] fatal: ambiguous argument '90bdbed3a41478cb6974912069938c41a87eb4ec^..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
2024-07-08 19:53:13.034 [info] > git check-ignore -v -z --stdin [5ms]
2024-07-08 19:53:13.874 [info] > git config --get commit.template [89ms]
2024-07-08 19:53:13.979 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [27ms]
2024-07-08 19:53:14.409 [info] > git status -z -uall [123ms]
2024-07-08 19:53:14.418 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/production refs/remotes/production [4ms]
2024-07-08 19:53:14.445 [info] > git config --local branch.production.vscode-merge-base [23ms]
2024-07-08 19:53:14.658 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/origin/master refs/remotes/origin/master [208ms]

Still occuring in:

Version: 1.92.0-insider (system setup)
Commit: b23e791eb5afbd95f05aa24da7693ce89344a079
Date: 2024-07-09T05:03:50.549Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

@lszomoru
Copy link
Member

lszomoru commented Jul 8, 2024

@Fydon, thank you! That is very helpful! Could you please run git show 90bdbed3a41478cb6974912069938c41a87eb4ec from the integrated terminal and share the output? Any details that you could share about the refs/remotes/origin/master, refs/heads/production, refs/remotes/origin/production would also be helpful. Thanks!

@Fydon
Copy link

Fydon commented Jul 8, 2024

git show 90bdbed3a41478cb6974912069938c41a87eb4ec does result is showing the contents of a change. git log --format=%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B -z --shortstat --diff-merges=first-parent 90bdbed3a41478cb6974912069938c41a87eb4ec --topo-order --decorate=full refs/heads/production refs/remotes/origin/production refs/remotes/origin/master shows an output of logs.

git show 90bdbed3a41478cb6974912069938c41a87eb4ec^.. results in

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

git log --format=%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B -z --shortstat --diff-merges=first-parent 90bdbed3a41478cb6974912069938c41a87eb4ec^.. --topo-order --decorate=full refs/heads/production refs/remotes/origin/production refs/remotes/origin/master results in

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

@BriceBoy
Copy link
Author

BriceBoy commented Jul 9, 2024

I have the problem again, more details as requested :
image

image

image

@lszomoru
Copy link
Member

lszomoru commented Jul 9, 2024

@Fydon, could you please run the following (should list all parents of this commit):

git log -n 1 --pretty=%P 90bdbed3a41478cb6974912069938c41a87eb4ec

@BriceBoy, could you please run the following

git log -n 1 --pretty=%P 2a44fd9a

These commits do not seem to have parents. Are they the first commits in the repository?
If not, what were the steps that you have taken to get into this state? Thank you!

@BriceBoy
Copy link
Author

BriceBoy commented Jul 9, 2024

I don't think it will help because I'm not in this state anymore. I made some manual commits since then.

I tried but it doesn't show anything

@Fydon
Copy link

Fydon commented Jul 9, 2024

git log -n 1 --pretty=%P 90bdbed3a41478cb6974912069938c41a87eb4ec has a blank output as you expected. Yes it is the first commit in the branch.

@lszomoru
Copy link
Member

lszomoru commented Jul 9, 2024

@Fydon when you say branch, are you talking about the refs/heads/production? So this is the first commit on this branch? How was the branch created? Is is expected that the common ancestor between refs/heads/production, refs/remotes/origin/production, and refs/remotes/origin/master is the first commit in the repository?

@Fydon
Copy link

Fydon commented Jul 9, 2024

Yes 90bdbed3a41478cb6974912069938c41a87eb4ec is the first commit in refs/heads/production. It was created before I worked with the repository so I can only guess how it was made. refs/remotes/origin/production is a git push of refs/heads/production to origin.

refs/heads/master is a branch that only has with a single commit of 90bdbed3a41478cb6974912069938c41a87eb4ec. It seems that refs/remotes/origin/master has a commit similar to 90bdbed3a41478cb6974912069938c41a87eb4ec but with a different hash. It is showing that refs/remotes/origin/master has 1 commit to pull and 1 commit to push, so maybe something like a rebase happened to the commit.

In my case the branch should just be deleted, but I'll leave it so that this can be debugged.

@lszomoru
Copy link
Member

This issue has been fixed in the latest VS Code Insiders release (version information below). The fix will also be included in the next VS Code Stable recovery release that is scheduled to be released later this week.

Version: 1.92.0-insider
Commit: 8703a11164db333db471576d38ddc143d6ad7ead
Date: 2024-07-10T08:26:11.347Z
Electron: 30.1.2
ElectronBuildId: 9759760
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.5.0

@lszomoru lszomoru added this to the July 2024 milestone Jul 10, 2024
@lszomoru lszomoru added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 10, 2024
@Fydon
Copy link

Fydon commented Jul 10, 2024

Thank you. I can confirm that the incoming/outgoing graph is no longer empty, that staged changes and changes display.

The graph appears to be showing all the commits in refs/heads/production. Is it assuming that refs/remotes/origin/master will receive all the changes, even though it will only receive the single commit in refs/remotes/origin/master? Should I open a new issue, given that the problem with the source control panel being empty is fixed?

@lszomoru
Copy link
Member

@Fydon, yes please file a separate issue so that I can better understand the exact structure of your repository. Thanks!

@Fydon
Copy link

Fydon commented Jul 10, 2024

Sorry reading the description in release notes again, I misunderstood what the new functionality is trying to do. If your changes have a base branch, its showing all the changes in both branches since the branch was created, which may also include changes that need to be pulled or pushed. This is working as expected. I thought that it was trying to only show incoming and outgoing changes, but I see now it's trying to achieve more than that. Sorry.

@lszomoru
Copy link
Member

@Fydon, thank you very much for reading the release notes to better understand the feature. Yes, the idea here is to show commits related to your inner loop which includes incoming/outgoing as well as commits that have not been merged into the base branch in case one exists. I am currently working on more options to be able to "hide" commits from particular branches (ex: base and/or remote).

Please continue to use the feature and share your feedback as it is extremely valuable.

@bvandevliet
Copy link

Maybe this git graph could also be the base for #179053 ??

@roblourens roblourens added the author-verification-requested Issues potentially verifiable by issue author label Jul 24, 2024
@TylerLeonhardt TylerLeonhardt added the verified Verification succeeded label Jul 24, 2024
@bendtherules
Copy link

bendtherules commented Aug 5, 2024

Feedback/criticism: Don't like this feature at all. It looks very busy, distracting and takes focus away from the actual changes. I understand that it's useful without using Gitlens, but why is it so in the face?

Q: Why is it not within a collapsible section? I can't even hide it by collapsing (like the Staged changed above) if I don't like it.
Q: Why is it so hard to disable it? I should be just able to right click and disable sections (just like Gitlens does it). It's not easy to find out what's it called in settings and disable it.
Q: Why does the graph show main branch as well (if you are in another branch)? If i deselect main branch in the hamburger menu, that doesn't seem to persist for long.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

9 participants