• Aaron Gable's avatar
    git-cl: upload to merge-base with master, not tip of origin/master · 0bbd1c28
    Aaron Gable authored
    Previously, if the branch structure was
    origin/master
      master [ 3 commits behind origin/master ]
        my-branch [ 1 commit ahead of master ]
    then git-cl would see that the upstream branch is master,
    and decide to diff against origin/master instead. But that
    diff would contain the contents of the three commits that
    the local master branch hasn't caught up with yet. That's
    not what we want.
    
    This CL makes it so that basing on top of local master is
    the same as basing on top of remote branches. Just like
    when based on top of origin/master, it simply calculates
    the merge-base with the parent commit (which is assumed
    to be present in the remote), and uploads that diff.
    
    Change-Id: I91caa30f6256a6e019e613dc5ff624734bca027e
    Reviewed-on: https://chromium-review.googlesource.com/499307Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
    Commit-Queue: Aaron Gable <agable@chromium.org>
    0bbd1c28
git_cl.py 217 KB