kernel-rebase: re-implement cherry-pick in terms of am

git cherry-pick uses the same mechanism for automatic conflict
resolution as patches in files (see CL:3139904). This makes rebase
results different across machines depending on local git history, which
is undesired. To address this, when a cherry-pick is requested, rebase
scripts will now export the commit to a patch file using existing
machinery and thus strip unwanted index information, making the results
deterministic.

BUG=b:198254879
TEST=./rebase.py, then run triage()

Change-Id: Idba649481ed15ca7d2bb7bceb51effcb8893c267
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/3263404
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Commit-Queue: Kamil Koczurek <koczurek@google.com>
Tested-by: Kamil Koczurek <koczurek@google.com>
2 files changed