From c99691260265ee7664ca1b42c9874de350b23abb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 24 Nov 2021 13:35:46 +0530 Subject: [PATCH] Only rebuild when transitioning between master and qt6 --- setup/git_post_checkout_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/git_post_checkout_hook.py b/setup/git_post_checkout_hook.py index cc0fded419..04c5047a5b 100755 --- a/setup/git_post_checkout_hook.py +++ b/setup/git_post_checkout_hook.py @@ -19,7 +19,7 @@ os.chdir(base) if flags == '1': # A branch checkout prev_branch, cur_branch = list(map(get_branch_name, (prev_rev, current_rev))) - if 'qt6' in (prev_branch, cur_branch): + if {prev_branch, cur_branch} == {'master', 'qt6'}: os.rename('bypy/b/other-b', 'bypy/c') os.rename('bypy/b', 'bypy/c/other-b') os.rename('bypy/c', 'bypy/b')