Merge "git: support git checkout for a commit hash"
This commit is contained in:
commit
34afa91fc9
@ -609,8 +609,9 @@ function git_clone {
|
|||||||
echo "the project to the \$PROJECTS variable in the job definition."
|
echo "the project to the \$PROJECTS variable in the job definition."
|
||||||
die $LINENO "ERROR_ON_CLONE is set to True so cloning not allowed in this configuration"
|
die $LINENO "ERROR_ON_CLONE is set to True so cloning not allowed in this configuration"
|
||||||
fi
|
fi
|
||||||
# '--branch' can also take tags
|
git_timed clone $git_clone_flags $git_remote $git_dest
|
||||||
git_timed clone $git_clone_flags $git_remote $git_dest --branch $git_ref
|
cd $git_dest
|
||||||
|
git checkout $git_ref
|
||||||
elif [[ "$RECLONE" = "True" ]]; then
|
elif [[ "$RECLONE" = "True" ]]; then
|
||||||
# if it does exist then simulate what clone does if asked to RECLONE
|
# if it does exist then simulate what clone does if asked to RECLONE
|
||||||
cd $git_dest
|
cd $git_dest
|
||||||
|
Loading…
Reference in New Issue
Block a user