mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
add ignoreSubmodules option
This commit is contained in:
parent
c6b510a3fe
commit
d7ed37e864
|
@ -1512,6 +1512,12 @@
|
|||
"default": false,
|
||||
"description": "%config.alwaysSignOff%"
|
||||
},
|
||||
"git.ignoreSubmodules": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
"default": false,
|
||||
"description": "%config.ignoreSubmodules%"
|
||||
},
|
||||
"git.ignoredRepositories": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
"config.detectSubmodulesLimit": "Controls the limit of git submodules detected.",
|
||||
"config.alwaysShowStagedChangesResourceGroup": "Always show the Staged Changes resource group.",
|
||||
"config.alwaysSignOff": "Controls the signoff flag for all commits.",
|
||||
"config.ignoreSubmodules": "Ignore modifications to submodules in the file tree.",
|
||||
"config.ignoredRepositories": "List of git repositories to ignore.",
|
||||
"config.scanRepositories": "List of paths to search for git repositories in.",
|
||||
"config.showProgress": "Controls whether git actions should show progress.",
|
||||
|
|
|
@ -12,7 +12,7 @@ import { EventEmitter } from 'events';
|
|||
import iconv = require('iconv-lite');
|
||||
import * as filetype from 'file-type';
|
||||
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter } from './util';
|
||||
import { CancellationToken, Progress } from 'vscode';
|
||||
import { CancellationToken, Progress, workspace } from 'vscode';
|
||||
import { URI } from 'vscode-uri';
|
||||
import { detectEncoding } from './encoding';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
|
||||
|
@ -1619,7 +1619,13 @@ export class Repository {
|
|||
return new Promise<{ status: IFileStatus[]; didHitLimit: boolean; }>((c, e) => {
|
||||
const parser = new GitStatusParser();
|
||||
const env = { GIT_OPTIONAL_LOCKS: '0' };
|
||||
const child = this.stream(['status', '-z', '-u'], { env });
|
||||
|
||||
const config = workspace.getConfiguration('git');
|
||||
const args = ['status', '-z', '-u'];
|
||||
if (config.get<boolean>('ignoreSubmodules')) {
|
||||
args.push('--ignore-submodules');
|
||||
}
|
||||
const child = this.stream(args, { env });
|
||||
|
||||
const onExit = (exitCode: number) => {
|
||||
if (exitCode !== 0) {
|
||||
|
|
|
@ -731,6 +731,9 @@ export class Repository implements Disposable {
|
|||
const onConfigListenerForUntracked = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.untrackedChanges', root));
|
||||
onConfigListenerForUntracked(this.updateModelState, this, this.disposables);
|
||||
|
||||
const onConfigListenerForIgnoreSubmodules = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.ignoreSubmodules', root));
|
||||
onConfigListenerForIgnoreSubmodules(this.updateModelState, this, this.disposables);
|
||||
|
||||
this.mergeGroup.hideWhenEmpty = true;
|
||||
this.untrackedGroup.hideWhenEmpty = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue