mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
depot_tools: Use git-checkout instead of git-rebase.
Changes like crrev.com/c/1752507, where a file that was previously in .gitignore becomes part of the repo, makes update_depot_tools fail to rebase. Use git checkout origin/master instead. Bug: 996359 Change-Id: Ib1a43b8842cebce96ab1fabaedc8e5653b9a708e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764708 Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This commit is contained in:
@@ -101,12 +101,11 @@ function update_git_repo {
|
||||
|
||||
git fetch -q origin &> /dev/null
|
||||
local REBASE_TXT STATUS
|
||||
REBASE_TXT=$(git rebase -q origin/master 2>&1)
|
||||
CHECKOUT_TXT=$(git checkout origin/master 2>&1)
|
||||
STATUS=$?
|
||||
if [[ $STATUS -ne 0 ]]; then
|
||||
echo "depot_tools update failed. Conflict in $base_dir" >&2
|
||||
echo "$REBASE_TXT" >&2
|
||||
git rebase --abort 2> /dev/null
|
||||
echo "$CHECKOUT_TXT" >&2
|
||||
fi
|
||||
return $STATUS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user