File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,19 @@ export const cloneRepository = async (
1818 path,
1919 } )
2020
21- await git . init ( /*bare = */ true ) ;
22-
23- await git . fetch ( [
21+ await git . clone (
2422 remoteUrl . toString ( ) ,
25- // See https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
26- "+refs/heads/*:refs/heads/*" ,
27- "--progress" ,
28- ] ) ;
23+ path ,
24+ [
25+ "--bare" ,
26+ ]
27+ ) ;
28+
29+ await unsetGitConfig ( path , [ "remote.origin.url" ] ) ;
30+
31+ await git . cwd ( {
32+ path,
33+ } ) . addConfig ( "remote.origin.fetch" , "+refs/heads/*:refs/heads/*" ) ;
2934 } catch ( error : unknown ) {
3035 const baseLog = `Failed to clone repository: ${ path } ` ;
3136
@@ -54,7 +59,6 @@ export const fetchRepository = async (
5459
5560 await git . fetch ( [
5661 remoteUrl . toString ( ) ,
57- "+refs/heads/*:refs/heads/*" ,
5862 "--prune" ,
5963 "--progress"
6064 ] ) ;
You can’t perform that action at this time.
0 commit comments