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

Error 'Unable to open compare', when git setting log.showsignature is active #1363

Closed
mtelgkamp opened this issue Feb 4, 2021 · 3 comments
Closed
Assignees
Labels
bug Something isn't working verified ✔ Verified
Milestone

Comments

@mtelgkamp
Copy link

  • GitLens Version: 11.1.3
  • Git Version: 2.30.0
  • VSCode Version: 1.52.1
  • OS Version: Ubuntu 20.10

Steps to Reproduce

  1. add git config setting log.showsignature=true
  2. try to display a diff of a file by selecting it in the COMMITS section
  3. Error: Unable to open compare. See output channel for more details

The reason

From the logs I figured out that the following git command is called

git log -n1 --no-renames --format=%H --find-object=HASH ANOTHER_HASH -- FILENAME

When I execute it manually the output looks like this:

gpg: some text
gpg: some text
gpg: some text
HASH VALUE

Afterwards the following command is in the GitLens (Git) log:

git show --name-status --format= gpg: Signature...

Idea

It might be useful to add the parameter -c log.showSignature=false to all git comands relying on the git output. In this case the command would look like this:

git  -c log.showSignature=false log -n1 --no-renames --format=%H --find-object=HASH ANOTHER_HASH -- FILENAME

Another option would be to ignore all output starting with gpg: .

@mtelgkamp mtelgkamp added potential-bug triage Needs to be looked at labels Feb 4, 2021
@eamodio eamodio added bug Something isn't working and removed potential-bug triage Needs to be looked at labels Feb 4, 2021
@eamodio eamodio added this to the Soon™ milestone Feb 4, 2021
@eamodio eamodio self-assigned this Feb 4, 2021
@eamodio eamodio closed this as completed in 1521451 Feb 9, 2021
@eamodio eamodio added needs-verification Request for community verification pending-release Resolved but not yet released to the stable edition labels Feb 9, 2021
@eamodio
Copy link
Member

eamodio commented Feb 9, 2021

Great catch -- it looks like I had a bunch of newer log calls that were failing to include the -c log.showSignature=false parameter.

Can you please verify this fix in tomorrow's insiders edition?

You can install the insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first.

@mtelgkamp
Copy link
Author

Thank you very much for the quick fix. It works for me, in the insider edition.

@eamodio eamodio added verified ✔ Verified and removed needs-verification Request for community verification labels Feb 10, 2021
@eamodio eamodio removed the pending-release Resolved but not yet released to the stable edition label Mar 5, 2021
@eamodio eamodio modified the milestones: Soon™, Shipped Mar 5, 2021
@github-actions
Copy link

github-actions bot commented Apr 5, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working verified ✔ Verified
Projects
None yet
Development

No branches or pull requests

2 participants