Skip to content

Commit

Permalink
$mol_build: shallow git clone
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Dec 14, 2023
1 parent 127b88c commit 32d765e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/build.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ namespace $ {
: matched[1]

this.$.$mol_exec( mod.path() , 'git' , 'remote' , 'add' , '--track' , head_branch_name! , 'origin' , repo.value )
this.$.$mol_exec( mod.path() , 'git' , 'pull' )
this.$.$mol_exec( mod.path() , 'git' , 'pull', '--deepen=1' )
mod.reset()
for ( const sub of mod.sub() ) {
sub.reset()
Expand All @@ -630,7 +630,7 @@ namespace $ {
}

for( let repo of mapping.select( 'pack' , mod.name() , 'git' ).sub ) {
this.$.$mol_exec( this.root().path() , 'git' , 'clone' , repo.value , mod.relate( this.root() ) )
this.$.$mol_exec( this.root().path() , 'git' , 'clone' , '--depth', '1', repo.value , mod.relate( this.root() ) )
mod.reset()
return true
}
Expand Down
2 changes: 1 addition & 1 deletion wire/task/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace $ {
}

// Disabled because non-idempotency is required for try-catch
// if( existen && sub instanceof $mol_wire_task ) {
// if( existen?.temp ) {
// $mol_fail( new Error( `$mol_wire_task detects nonidempotency\n${existen}` ) )
// }

Expand Down

0 comments on commit 32d765e

Please sign in to comment.