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:
parent
f026de4e19
commit
153b0d6751
@ -18,3 +18,5 @@ export enum SemanticTokenTypes {
|
||||
RemoteHeadName = 'magit-remote-head-name',
|
||||
TagName = 'magit-tag-name',
|
||||
}
|
||||
|
||||
export const GitConfigOverrideArgs = ['-c', 'diff.noprefix=false'];
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user