• intrigeri's avatar
    Honor $BASE_BRANCH_GIT_COMMIT (refs: #16730) · 211f15af
    intrigeri authored
    So far we relied on a hack in our Jenkins job (set_origin_base_branch_head) to
    tweak Git state in a way that git_base_branch_head gets it right. But that's
    complex, fragile, and interacts badly with the refs mangling we do in
    build-tails. So let's instead honor a pre-existing $BASE_BRANCH_GIT_COMMIT, so
    we can drop the set_origin_base_branch_head hack from the Jenkins job.
    What I'm doing here seems to have been the original intent of the work that was
    done on #11972: f4a20a41 and
    49c29304 have started work in this direction,
    that was never finished, and $BASE_BRANCH_GIT_COMMIT was left entirely unused,
    which confused me a great deal when starting to work on this.
    Incidentally, this change makes $BASE_BRANCH_GIT_COMMIT behave in the same way
    as $GIT_COMMIT (which is already taken from the environment if set), which
    is more consistent and less confusing.
    Commit c579fc97df8ea41dda67e24047cae131b2425250 in jenkins-jobs.git
    sets $BASE_BRANCH_GIT_COMMIT to the commit that the base branch was in
    during the first build, that we're trying to reproduce.