From 77cd51991f8b9c76e54d668103a06ca6c597e64a Mon Sep 17 00:00:00 2001 From: Opportunity Date: Sun, 24 May 2020 00:23:14 +0800 Subject: [PATCH] fix --- dist/git.js | 2 +- src/git.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/git.js b/dist/git.js index 8fd04be..97ada49 100644 --- a/dist/git.js +++ b/dist/git.js @@ -43,7 +43,7 @@ async function create(ref) { await io.mkdirP(opt.cwd); await exec_1.exec('git', ['init'], opt); await exec_1.exec('git', ['remote', 'add', 'origin', 'https://github.com/xmake-io/xmake.git'], opt); - await exec_1.exec('git', ['fetch'], opt); + await exec_1.exec('git', ['fetch', 'origin', '+refs/pull/*:refs/remotes/origin/pull/*', '+refs/heads/*:refs/remotes/origin/*'], opt); await exec_1.exec('git', ['checkout', ref], opt); await exec_1.exec('git', ['submodule', 'update', '--init', '--recursive'], opt); return opt.cwd; diff --git a/src/git.ts b/src/git.ts index 3571c64..1ad3fba 100644 --- a/src/git.ts +++ b/src/git.ts @@ -61,7 +61,7 @@ export async function create(ref: string): Promise { await io.mkdirP(opt.cwd); await exec('git', ['init'], opt); await exec('git', ['remote', 'add', 'origin', 'https://github.com/xmake-io/xmake.git'], opt); - await exec('git', ['fetch'], opt); + await exec('git', ['fetch', 'origin', '+refs/pull/*:refs/remotes/origin/pull/*', '+refs/heads/*:refs/remotes/origin/*'], opt); await exec('git', ['checkout', ref], opt); await exec('git', ['submodule', 'update', '--init', '--recursive'], opt); return opt.cwd;