1
1
mirror of https://github.com/kahole/edamagit.git synced 2024-08-15 18:20:30 +03:00

adds git -c diff.noprefix=false to raw commands (adressing #276)

This commit is contained in:
Kristian Andersen Hole 2024-01-18 22:21:26 +01:00
parent f026de4e19
commit 153b0d6751
2 changed files with 5 additions and 2 deletions

View File

@ -18,3 +18,5 @@ export enum SemanticTokenTypes {
RemoteHeadName = 'magit-remote-head-name',
TagName = 'magit-tag-name',
}
export const GitConfigOverrideArgs = ['-c', 'diff.noprefix=false'];

View File

@ -5,6 +5,7 @@ import { findGit } from './findGit';
import * as iconv from '@vscode/iconv-lite-umd';
import { dispose, IDisposable, toDisposable } from './disposable';
import { magitConfig } from '../../extension';
import { GitConfigOverrideArgs } from '../../common/constants';
const canceledName = 'Canceled';
class CancellationError extends Error {
@ -177,9 +178,9 @@ async function _exec(args: string[], options: SpawnOptions = {}): Promise<IExecu
if (pathHints.length !== 0) {
pathHints = pathHints.filter(p => path.isAbsolute(p));
}
const git = await findGit(pathHints, () => true);
const child = spawn(git.path, args, options);
const child = spawn(git.path, [...GitConfigOverrideArgs, ...args], options);
// options.onSpawn?.(child);