From 25410068111f6a8dba36495ea146fa5cd4eb78f3 Mon Sep 17 00:00:00 2001 From: Joanna Wang Date: Thu, 10 Aug 2023 23:28:44 +0000 Subject: [PATCH] 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 Reviewed-by: Gregory Nisbet Reviewed-by: Robbie Iannucci --- git_common.py | 2 +- git_freezer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git_common.py b/git_common.py index 7ff03b7fc..4add1782b 100644 --- a/git_common.py +++ b/git_common.py @@ -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 ' ?': diff --git a/git_freezer.py b/git_freezer.py index afcfb750f..e4b1d8b16 100755 --- a/git_freezer.py +++ b/git_freezer.py @@ -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()