fromupstream: use --reject for git-apply

Instead of getting nothing from the whole patch doesn't apply, use
--reject to get some hints, and get the chance to manually fix the
conflicts.

Quote the following from `man git-apply`:

For atomicity, git apply by default fails the whole patch and does not
touch the working tree when some of the hunks do not apply. This option
makes it apply the parts of the patch that are applicable, and leave
the rejected hunks in corresponding *.rej files.

BUG=none
TEST=1. fromupstream.py -b "b:BUG_ID" -t "TEST"
pw://linux-mediatek/11705705
2. git status

Change-Id: I3481f568a67e1594a584e980486822c70bffe36b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2345646
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
Tested-by: Tzung-Bi Shih <tzungbi@chromium.org>
1 file changed