diff options
Diffstat (limited to 'src/git-command-manager.ts')
| -rw-r--r-- | src/git-command-manager.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 6ab807b..7752cfa 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -34,6 +34,7 @@ export interface IGitCommandManager { filter?: string fetchDepth?: number fetchTags?: boolean + showProgress?: boolean } ): Promise<void> getDefaultBranch(repositoryUrl: string): Promise<string> @@ -241,14 +242,22 @@ class GitCommandManager { async fetch( refSpec: string[], - options: {filter?: string; fetchDepth?: number; fetchTags?: boolean} + options: { + filter?: string + fetchDepth?: number + fetchTags?: boolean + showProgress?: boolean + } ): Promise<void> { const args = ['-c', 'protocol.version=2', 'fetch'] if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) { args.push('--no-tags') } - args.push('--prune', '--progress', '--no-recurse-submodules') + args.push('--prune', '--no-recurse-submodules') + if (options.showProgress) { + args.push('--progress') + } if (options.filter) { args.push(`--filter=${options.filter}`) |
