File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ const { exec } = require("child_process");
2
2
const util = require ( "util" ) ;
3
3
const execPromosified = util . promisify ( exec ) ;
4
4
const fetchRepoPath = require ( "../global/fetchGitRepoPath" ) ;
5
+ const { getStagedFiles } = require ( "./gitGetStagedFilesAPI" ) ;
5
6
6
7
async function gitTrackedDiff ( repoId ) {
7
8
const repoPath = fetchRepoPath . getRepoPath ( repoId ) ;
8
9
9
10
var responseObject = {
10
- gitChangedFiles : await getGitDiff ( repoPath ) . then ( ( res ) => res ) ,
11
- gitUntrackedFiles : await getUntrackedFiles ( repoPath ) . then ( ( res ) => res ) ,
11
+ gitChangedFiles : await getGitDiff ( repoPath ) ,
12
+ gitUntrackedFiles : await getUntrackedFiles ( repoPath ) ,
13
+ gitStagedFiles : await getStagedFiles ( repoId ) ,
12
14
} ;
13
15
14
16
console . log ( responseObject ) ;
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ const globalAPISchema = new buildSchema(
79
79
type gitChangeResults{
80
80
gitUntrackedFiles: [String]
81
81
gitChangedFiles: [String]
82
+ gitStagedFiles: [String]
82
83
}
83
84
84
85
type gitFileLineChangeResults{
You can’t perform that action at this time.
0 commit comments