File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 */
66import util = require( "util" ) ;
77import childProcess = require( "child_process" ) ;
@@ -11,9 +11,9 @@ import { getWorkspaceFolder } from "../workspace";
1111const 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
You can’t perform that action at this time.
0 commit comments