Skip to content

File diffs can't be expanded in status view when diff.external is set in git config #348

@zmwangx

Description

@zmwangx

This is really a continuation of #228. A fix was provided there in the form of #293 but unfortunately doesn't fix the problem, at least not in the status view.

The reason is that the fix is in the diff function in diffingCommands.ts but the status view doesn't use that for diffing. Instead, the diff is obtained with repository.diffWithHEAD using VSCode's builtin vscode.git extension API, with doesn't supply --no-ext-diff. I'm hesitant to call that a bug in vscode.git since I don't think it promises to give a parseable vanilla diff in the first place?

The best solution might be switching to the ext-diff aware diff implementation.

Barring that users who want to use this feature while keeping difft will have to disable diff.external and rely on shell aliases for git -c diff.external=difft ... to use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions