Commit 7d8b9f2d authored by OAI Jenkins's avatar OAI Jenkins
Browse files

CI: do perfect merge even in case of shallow workspace


Signed-off-by: default avatarOAI Jenkins <jenkins@openairinterface.org>
parent cca5bcd9
...@@ -103,6 +103,17 @@ esac ...@@ -103,6 +103,17 @@ esac
done done
# If the repo workspace is shallow, unshallow it
NB_COMMITS=`git log --oneline | wc -l`
if [ $NB_COMMITS -eq 1 ]
then
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" > /dev/null 2>&1
echo "git remote update"
git remote update > /dev/null 2>&1
echo "git fetch --prune --unshallow"
git fetch --prune --unshallow > /dev/null 2>&1
fi
if [[ $TARGET_COMMIT_ID == "latest" ]] if [[ $TARGET_COMMIT_ID == "latest" ]]
then then
TARGET_COMMIT_ID=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH` TARGET_COMMIT_ID=`git log -n1 --pretty=format:%H origin/$TARGET_BRANCH`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment