Skip to content

Change how GitLens runs certain Git commands (e.g. avoid using the terminal) #3527

@eamodio

Description

@eamodio

Currently GitLens falls back to terminal execution for certain git commands. It was mainly done out of convenience to avoid needing to handle many error cases, but also so that the user could easily tweak the command and execute it again themselves.

We should replace those terminal-run command with custom command like all our other Git commands, though it could still be really nice to offer to open the terminal with the command as an option/button on an error dialog/notification if the user chooses.

Can find all the commands that call this:

async runGitCommandViaTerminal(cwd: string, command: string, args: string[], options?: { execute?: boolean }) {

Which really boils down to callers of:

private async runTerminalCommand(command: string, ...args: string[]) {
await this.container.git.runGitCommandViaTerminal?.(this.uri, command, args, { execute: true });
setTimeout(() => this.fireChange(RepositoryChange.Unknown), 2500);
}

This will ultimately resolve: #3364, #2889, #2664, #2607, #2541, #2444, #2312, #2057, #1901, #1450, #732, #3364, #1767

Sub-issues

Metadata

Metadata

Assignees

Labels

pending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions