Skip to content

Commit 734080d

Browse files
committed
refactor: update cli.ts
1 parent fbe1b0d commit 734080d

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
@@ -31,7 +31,7 @@ function _execute(cwd: string, subcommand: string, options: string[] = []) {
3131
* The output already seems to never have color info, from my testing, but the no-color flagged is
3232
* added still to be safe.
3333
*/
34-
async function diffIndex(options: string[] = []): Promise<Array<string>> {
34+
async function _diffIndex(options: string[] = []): Promise<Array<string>> {
3535
const fullOptions = [
3636
"--name-status",
3737
"--find-renames",
@@ -62,10 +62,10 @@ async function diffIndex(options: string[] = []): Promise<Array<string>> {
6262
* Always excludes untracked files - make sure to stage a file so it becomes tracked, especially
6363
* in the case of a rename.
6464
*
65-
* Returns an array of strings, coming from the `diffIndex` function.
65+
* Returns an array of strings.
6666
*/
6767
export async function getChanges() {
68-
const stagedChanges = await diffIndex(["--cached"]);
68+
const stagedChanges = await _diffIndex(["--cached"]);
6969

7070
if (stagedChanges.length) {
7171
console.debug("Found staged changes");
@@ -77,7 +77,7 @@ export async function getChanges() {
7777
"Staging area is empty. Using unstaged files (tracked files only still)."
7878
);
7979

80-
const allChanges = await diffIndex();
80+
const allChanges = await _diffIndex();
8181

8282
if (!allChanges.length) {
8383
console.debug("No changes found");

0 commit comments

Comments
 (0)