Skip to content

Commit

Permalink
Set --no-ext-diff when running git diff
Browse files Browse the repository at this point in the history
If a user has the following set in their git config:

```properties
[diff]
  external = difft
```

edmagit will fail to parse the `git diff` output. This should fix that.

Fixes #228
  • Loading branch information
garymm authored Mar 25, 2024
1 parent 5254658 commit 4ee6091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/diffingCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function diffWorktree({ repository }: MenuState) {
}

async function diff(repository: MagitRepository, id: string, args: string[] = []) {
const diffResult = await gitRun(repository.gitRepository, ['diff', ...args]);
const diffResult = await gitRun(repository.gitRepository, ['diff', '--no-ext-diff', ...args]);

const uri = DiffView.encodeLocation(repository, id);
return ViewUtils.showView(uri, new DiffView(uri, diffResult.stdout));
Expand Down

0 comments on commit 4ee6091

Please sign in to comment.