| 375 | | set options "-q" |
| 376 | | if {[string length ${git.branch}] == 0} { |
| 377 | | # if we're just using HEAD, we can make a shallow repo |
| 378 | | set options "$options --depth=1" |
| 379 | | } |
| 380 | | set cmdstring "${git.cmd} clone $options ${git.url} ${worksrcpath} 2>&1" |
| 381 | | ui_debug "Executing: $cmdstring" |
| 382 | | if {[catch {system $cmdstring} result]} { |
| | 378 | set git.args "clone -q -n" |
| | 379 | if {[catch {command_exec git "" "2>&1"} result]} { |
| 386 | | if {[string length ${git.branch}] > 0} { |
| 387 | | set env "GIT_DIR=${worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}" |
| 388 | | set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1" |
| 389 | | ui_debug "Executing $cmdstring" |
| 390 | | if {[catch {system $cmdstring} result]} { |
| 391 | | return -code error [msgcat::mc "Git checkout failed"] |
| 392 | | } |
| | 383 | set git.dir ${git.dir}/${distname} |
| | 384 | set git.args "checkout -q -b ${git.branch}" |
| | 385 | set git.post_args "" |
| | 386 | if {[catch {command_exec git "" "2>&1"} result]} { |
| | 387 | return -code error [msgcat::mc "Git checkout failed"] |