Git Clone Step: merge happens when manual_merge is no

Bitrise Build Issue Report template

Description of the issue

Looks like manual_merge flag is ignored on git clone step.

^[[34;1mgit "checkout" "master"^[[0m
Already on 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
^[[34;1mgit "merge" "origin/master"^[[0m
Already up to date.
^[[34;1mgit "merge" "pull/3131"^[[0m
Updating 0dc774862..1fa39acfa

bitrise.yml

    - git-clone:
        inputs:
        - manual_merge: 'no'

Environment:

Xcode9.2 stack
Git Clone 4.0.9

Hi @toshi0383,

The option is not ignored. In case of GitHub if you set manual_merge to no that means that we won’t do the merge ourselves, from the source to the target, but instead we’ll merge the GitHub provided pull/X/head into the target.

Originally we used the github provided pull/X/merge directly, which includes the pre-merged code directly, but due to recent changes on how/when github updates that branch we had to change that. In short, in the past if you pushed a code change to an open PR the /merge branch was auto updated by github, every time. A couple of months ago github changed this and it’ll now only update the /merge branch if you actually visit the page on the web UI. This means that there’s no point in testing /merge as it might be outdated.

I hope this explains the situation, but if you’d have any questions feel free to ask, we’re happy to answer/help! :wink:

Thanks, now I understand.:ok_hand:
ref:

1 Like

Ahh, indeed, I forgot we had a blog post about this, good catch @toshi0383! :wink: