crosvm/tools/chromeos/rebase_for_review
Junichi Uekawa 3cb328aa10 crosvm: Script for rebasing on main from chromeos branch.
chromeos branch is a stable base to work on, but patches need to land on
the main branch. For uploading to that directory, it's always necessary
to rebase onto that branch.

BUG=b:227535695
TEST=rebase_for_review && repo upload --cbr .

Change-Id: I5f41e52f91adf15ade84ae09f6b34dcdbe733d23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3565627
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-05-30 07:26:07 +00:00

22 lines
568 B
Bash
Executable file

#!/bin/bash
# Copyright 2022 The ChromiumOS Authors.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
function main() {
local review_branch="tmp-$(date +%Y%m%d)-$RANDOM"
git checkout -b "${review_branch}"
git branch --set-upstream-to cros/main
git fetch cros main
git rebase --onto cros/main cros/chromeos "${review_branch}" || true
echo "
Review branch ${review_branch} created!
Resolve any conflicts and do review with repo upload.
git checkout - to go back to the previous branch."
}
main