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

External diff command always launched when opening files instead of plain git diff #96

Closed
carlobonamico opened this issue Jun 15, 2017 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@carlobonamico
Copy link

  • GitLens Version:
  • VSCode Version: 1.13
  • OS Version: Ubuntu 16.04 LTS

Steps to Reproduce:

  1. Configure global git to use an external diff command in .gitconfig
[diff]
        external = external-diff-cmd
  1. install vscode-gitlens
  2. launch vscode, open git project
  3. navigate to various files
  4. when opening a file for the first time, the external-diff-cmd is always launched thus interrupting the editing flow

In my specific case I followed these instructions to configure meld as the diff viewer https://nathanhoad.net/how-to-meld-for-git-diffs-in-ubuntu-hardy.

[diff]
        external = /home/user/scripts/diff.py

where diff.py contains

#!/usr/bin/python

import sys
import os

os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5]))

which is needed just to adapt the order in which git diff passes cli arguments to the order expected by meld

Proposed fix

Launch git diff with an option specifying to use the internal diff algorithm or plain diff

@eamodio eamodio added the bug Something isn't working label Jun 16, 2017
@eamodio eamodio self-assigned this Jun 16, 2017
@eamodio
Copy link
Member

eamodio commented Jun 16, 2017

@carlobonamico Thank you so much for this awesome bug report! 4.1.2 is out now with your fix -- thanks again!

billsedison added a commit to noside911/vscode-gitlens that referenced this issue Jan 4, 2019
Added code syntax highlighting for Comment Viewer and Editor apps
@github-actions
Copy link

github-actions bot commented Dec 8, 2020

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 Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants