File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,9 @@ def test_clones_all_branches_true(file_config):
108
108
# initially we should not see multiple branches
109
109
branch_out = subprocess .check_output ((
110
110
'git' , '-C' , str (file_config .output_dir .join ('repo1' )),
111
- 'branch ' , '--remote' ,
111
+ 'for-each-ref ' , 'refs/remotes' , "--format='%(refname:strip=2)'" ,
112
112
)).decode ()
113
- assert branch_out == ' origin/main \n '
113
+ assert branch_out == "' origin/HEAD' \n 'origin/main' \n "
114
114
115
115
# set that we want to clone all branches
116
116
cfg_contents = json .loads (file_config .cfg .read ())
@@ -121,9 +121,9 @@ def test_clones_all_branches_true(file_config):
121
121
122
122
branch_out = subprocess .check_output ((
123
123
'git' , '-C' , str (file_config .output_dir .join ('repo1' )),
124
- 'branch ' , '--remote' ,
124
+ 'for-each-ref ' , 'refs/remotes' , "--format='%(refname:strip=2)'" ,
125
125
)).decode ()
126
- assert branch_out == ' origin/b2 \n origin/main\n '
126
+ assert branch_out == "' origin/HEAD' \n 'origin/b2' \n ' origin/main' \n "
127
127
128
128
129
129
def test_it_sorts_filtered_repos (file_config ):
You can’t perform that action at this time.
0 commit comments