Don't commit unstaged gitlinks in FREEZE.index during rebase-update.

To avoid having users deal with merge conflicts between unstaged
gitlinks modified before and after a git rebase-update we can just
not commit unstaged gitlinks in our freeze index.

This change results in whatever gitlinks are unstaged before
git rebase-update to be just rebased on top of whatever the latest
gitlinks are from remote.

Bug: 1472148

Change-Id: If7dcb82778a0bdd14c408f0a0287780a7bdc5358
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4771356
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gregory Nisbet <gregorynisbet@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
changes/56/4771356/9
Joanna Wang 2 years ago committed by LUCI CQ
parent 923bcf8635
commit 2541006811

@ -448,7 +448,7 @@ def freeze():
# will be set to true if there are any indexed files to commit.
have_indexed_files = False
for f, s in status():
for f, s in status(ignore_submodules='all'):
if is_unmerged(s):
die("Cannot freeze unmerged changes!")
if s.lstat not in ' ?':

@ -12,7 +12,7 @@ from git_common import freeze, thaw
def CMDfreeze(parser, args):
"""Freeze a branch's changes."""
"""Freeze a branch's changes, excluding unstaged gitlinks changes."""
parser.parse_args(args)
return freeze()

Loading…
Cancel
Save