@@ -44,14 +44,22 @@ const gitFetchApi = async (repoId, remoteUrl, remoteBranch) => {
44
44
} ;
45
45
}
46
46
47
- return await execPromisified ( `git fetch ${ remoteName } ${ remoteBranch } ` , {
47
+ return await execPromisified ( `git fetch ${ remoteName } ${ remoteBranch } -v ` , {
48
48
cwd : fetchRepopath . getRepoPath ( repoId ) ,
49
49
windowsHide : true ,
50
50
} )
51
51
. then ( ( { stdout, stderr } ) => {
52
52
if ( stdout || stderr ) {
53
53
// Git fetch alone returns the result in the standard error stream
54
- const fetchResponse = stderr . trim ( ) . split ( "\n" ) ;
54
+ let responseValue = "" ;
55
+ if ( stdout ) {
56
+ responseValue += stdout ;
57
+ }
58
+ if ( stderr ) {
59
+ responseValue += stderr ;
60
+ }
61
+
62
+ const fetchResponse = responseValue . trim ( ) . split ( "\n" ) ;
55
63
56
64
console . log ( "Fetch Response :" + fetchResponse ) ;
57
65
if ( fetchResponse ) {
@@ -92,13 +100,20 @@ const gitPullApi = async (repoId, remoteUrl, remoteBranch) => {
92
100
} ;
93
101
}
94
102
95
- return await execPromisified ( `git pull ${ remoteName } ${ remoteBranch } ` , {
103
+ return await execPromisified ( `git pull ${ remoteName } ${ remoteBranch } -v ` , {
96
104
cwd : fetchRepopath . getRepoPath ( repoId ) ,
97
105
windowsHide : true ,
98
106
} )
99
107
. then ( async ( { stdout, stderr } ) => {
100
108
if ( stdout || stderr ) {
101
- const pullResponse = stderr . trim ( ) . split ( "\n" ) ;
109
+ let responseValue = "" ;
110
+ if ( stdout ) {
111
+ responseValue += stdout ;
112
+ }
113
+ if ( stderr ) {
114
+ responseValue += stderr ;
115
+ }
116
+ const pullResponse = responseValue . trim ( ) . split ( "\n" ) ;
102
117
103
118
if ( pullResponse && pullResponse . length > 0 ) {
104
119
return {
0 commit comments