• Robert Iannucci's avatar
    [gclient] Reset to parent commit with rebase_patch_ref=False instead of master. · c39a7788
    Robert Iannucci authored
    This makes no-rebase-patch-ref correctly populate `file_list` and work with
    `git diff --cached` (i.e. they will show only the files affected by the
    patchset).
    
    Previously gclient would `reset --soft` to master. Because we didn't rebase
    on top of master with `no-rebase-patch-ref`, it has roughly nothing to do
    with the patchref we just checked out.
    
    R=gbeaty@chromium.org, ltina@google.com, tandrii@chromium.org
    
    Context:
    Tricium recipes sometimes need to use no-rebase-patch-ref in order to get
    accurate linenumbers in the diff (i.e. so that the tricium comments will
    actually line up correctly with the patchset the user uploaded); Tricium
    recipes also need to accurately get the diff file list in this mode.
    Change-Id: I5f3c95cd4958cf407a83b96c238b8c55c452ac81
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1895041
    Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
    Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
    Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
    c39a7788
gclient_scm_test.py 46.8 KB