Skip to content

Commit fbe1b0d

Browse files
committed
refactor: update cli.ts
1 parent 9e2e41f commit fbe1b0d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/git/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Git CLI module.
33
*
4-
* Run `git` commands in the shell internally and capture the output.
4+
* Run Git CLI commands within the extension and capture the text output.
55
*/
66
import util = require("util");
77
import childProcess = require("child_process");
@@ -11,9 +11,9 @@ import { getWorkspaceFolder } from "../workspace";
1111
const exec = util.promisify(childProcess.exec);
1212

1313
/**
14-
* Run a given `git` command and return output.
14+
* Run a `git` subcommand with options and return output.
1515
*/
16-
function execute(cwd: string, subcommand: string, options: string[] = []) {
16+
function _execute(cwd: string, subcommand: string, options: string[] = []) {
1717
const command = `git ${subcommand} ${options.join(" ")}`;
1818

1919
return exec(command, { cwd });
@@ -40,7 +40,7 @@ async function diffIndex(options: string[] = []): Promise<Array<string>> {
4040
...options,
4141
"HEAD",
4242
];
43-
const { stdout, stderr } = await execute(
43+
const { stdout, stderr } = await _execute(
4444
getWorkspaceFolder(),
4545
"diff-index",
4646
fullOptions

0 commit comments

Comments
 (0)