gerrit-one-way-sync: merge instead of rebase

This commit is contained in:
Yureka 2024-07-19 23:13:20 +02:00
parent 03b53234d3
commit 0ff5eea4ed

View file

@ -31,8 +31,8 @@ let
git pull origin ${fromRefspec}
EXPECTED_REF=$(git rev-list ${localRefspec} | head -1)
git fetch ${fromUri} ${fromRefspec}
git rebase FETCH_HEAD
GIT_SSH_COMMAND='ssh -i ${cfg.deployKeyPath}' git push ${cfg.pushUrl} HEAD:${targetRef} --force-with-lease=${targetRef}:$EXPECTED_REF --force-if-includes
git merge FETCH_HEAD
GIT_SSH_COMMAND='ssh -i ${cfg.deployKeyPath}' git push ${cfg.pushUrl} HEAD:${targetRef}
'';
serviceConfig = {
User = "git";