We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a9878f commit f9a33fcCopy full SHA for f9a33fc
1 file changed
src/bundle/git.ts
@@ -1,16 +1,17 @@
1
import simpleGit from 'simple-git'
2
import { info } from './utils'
3
4
+const git = simpleGit()
5
+
6
export function fetchOrigin() {
- return simpleGit().fetch('origin')
7
+ return git.fetch('origin')
8
}
9
-export function checkout(commit: string) {
10
+export async function checkout(commit: string) {
11
info(`Switch to ${commit}`)
- return simpleGit().raw(['switch', '--detach', commit])
12
+ await git.checkout(commit)
13
14
15
export async function gitRestore() {
- await simpleGit().raw(['restore', '.'])
- await simpleGit().raw(['switch', '-'])
16
+ await git.raw(['switch', '-'])
17
0 commit comments