test: allow missing remote branches
The code for checking out source code for testing no longer worked with newer git when there weren't any remote branches which had to be reset. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
parent
1216bdaebc
commit
77a9a450d2
1 changed files with 4 additions and 2 deletions
|
@ -723,8 +723,10 @@ class GitCopy(GitCheckoutBase, Action):
|
|||
'if git branch | grep -q -w "^..nightly$"; then git branch -D nightly; fi',
|
||||
# fetch
|
||||
'echo "remove stale merge branches and fetch anew"',
|
||||
'git branch -r -D $( git branch -r | grep -e "/for-%(revision)s/" ) ',
|
||||
'git branch -D $( git branch | grep -e "^ for-%(revision)s/" ) ',
|
||||
'branches=$( git branch -r | grep -e "/for-%(revision)s/"; true )',
|
||||
'( [ ! "$branches" ] || git branch -r -D $branches )',
|
||||
'branches=$( git branch | grep -e "^ for-%(revision)s/"; true )',
|
||||
'( [ ! "$branches" ] || git branch -D $branches )',
|
||||
'git fetch',
|
||||
'git fetch --tags',
|
||||
# pick tag or remote branch
|
||||
|
|
Loading…
Reference in a new issue