Skip to content

Commit 2ddece4

Browse files
committed
Revert git.js changes
1 parent fcf6c73 commit 2ddece4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/git.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class Git {
122122

123123
async getBaseBranch() {
124124
this.baseBranch = await execCmd(
125-
`git branch --show-current`,
125+
`git rev-parse --abbrev-ref HEAD`,
126126
this.workingDir
127127
)
128128
}
@@ -201,7 +201,7 @@ export default class Git {
201201

202202
async getLastCommitSha() {
203203
this.lastCommitSha = await execCmd(
204-
`git log -1 --format='%H'`,
204+
`git rev-parse HEAD`,
205205
this.workingDir
206206
)
207207
}
@@ -547,4 +547,4 @@ export default class Git {
547547
})
548548
this.lastCommitSha = request.data.sha
549549
}
550-
}
550+
}

0 commit comments

Comments
 (0)