1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cmd/v: version: print only main repo hash

This commit is contained in:
Alexander Medvednikov
2020-05-16 23:52:03 +02:00
parent fb27fe5379
commit 81148fa2bd
2 changed files with 18 additions and 10 deletions

View File

@@ -33,8 +33,12 @@ pub fn full_hash() string {
}
// full_v_version() returns the full version of the V compiler
pub fn full_v_version() string {
return 'V ${v_version} ${full_hash()}'
pub fn full_v_version(is_verbose bool) string {
if is_verbose {
return 'V ${v_version} ${full_hash()}'
}
hash := githash(false)
return 'V ${v_version} $hash'
}
// githash(x) returns the current git commit hash.
@@ -172,7 +176,7 @@ pub fn quote_path_with_spaces(s string) string {
pub fn args_quote_paths_with_spaces(args []string) string {
mut res := []string{}
for a in args {
res << quote_path_with_spaces( a )
res << quote_path_with_spaces(a)
}
return res.join(' ')
}