mirror of
https://github.com/ceph/ceph
synced 2024-12-30 07:23:11 +00:00
workunit: git checkout sha1/branch/tag
git clone --branch refspec only accepts branches and tags but not a sha1
git reset --hard refspec only accepts tags and sha1 but not branches
Use git checkout because it interprets branches, tags and sha1 as
expected.
$ git checkout jewel
Branch jewel set up to track remote branch jewel from origin.
Switched to a new branch 'jewel'
$ git checkout v0.94.6
HEAD is now at e832001... 0.94.6
$ git checkout b2503b0e15
HEAD is now at 95cefea... 0.94.3
Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
parent
7413c38bdf
commit
d1f456850c
@ -314,13 +314,13 @@ def _run_tests(ctx, refspec, role, tests, env, subdir=None, timeout=None):
|
||||
args=[
|
||||
'git',
|
||||
'clone',
|
||||
'--branch',
|
||||
refspec,
|
||||
git_url,
|
||||
clonedir,
|
||||
run.Raw(';'),
|
||||
'cd', '--', clonedir,
|
||||
run.Raw('&&'),
|
||||
'git', 'checkout', refspec,
|
||||
run.Raw('&&'),
|
||||
'mv', 'qa/workunits', srcdir,
|
||||
],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user