Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 11, 2024
1 parent 7f7b057 commit f16f20f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/tools/vpm/vcs.v
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ const vcs_info = init_vcs_info() or {
}

fn init_vcs_info() !map[VCS]VCSInfo {
raw_installed_git_ver := os.execute_opt('git --version') or { return err }.output.all_after_last(' ').trim_space()
installed_git_ver := semver.from(raw_installed_git_ver) or { return err }
submod_filter_version := semver.from('2.36.0') or { return err }
mut git_install_cmd := 'clone --depth=1 --recursive --shallow-submodules --filter=blob:none'
submod_filter_version := semver.from('2.36.0') or { panic(err) }
raw_installed_git_ver := os.execute_opt('git --version') or {
return error('failed to find git')
}.output.all_after_last(' ').trim_space()
installed_git_ver := semver.from(raw_installed_git_ver) or {
return error('failed to parse git version `${raw_installed_git_ver}`')
}
if installed_git_ver >= submod_filter_version {
git_install_cmd += ' --also-filter-submodules'
}
Expand Down

0 comments on commit f16f20f

Please sign in to comment.