Skip to content

Commit f7baa90

Browse files
committed
simplify more verify.v
1 parent 8eead44 commit f7baa90

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

verify.v

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,14 @@ fn vout(v_file string, output string) !(string, bool) {
5656

5757
fn discover_files() ![]string {
5858
if os.getenv('CHANGED') != '' {
59-
base_ref := 'origin/main'
60-
ref := 'HEAD'
61-
git_diff_cmd := 'git --no-pager diff --name-only ${base_ref} ${ref}'
59+
git_diff_cmd := 'git --no-pager diff --name-only origin/main HEAD'
6260
eprintln(git_diff_cmd)
6361
changes := os.execute(git_diff_cmd).output.split_into_lines()
6462
dump(changes)
6563
files := changes.filter(it.ends_with('.v') && it.starts_with('20'))
66-
if files.len > 0 {
67-
println('running only a subset of all tests, based on the git diff for the new/changed solutions, compared to the main origin branch: ${files}')
68-
flush_stdout()
69-
return files
70-
}
64+
println('running only a subset of all tests, based on the git diff for the new/changed solutions, compared to the main origin branch: ${files}')
65+
flush_stdout()
66+
return files
7167
}
7268

7369
glob_pattern := '*' + os.args[1] or { '' } + '*'

0 commit comments

Comments
 (0)