I'm working on a Android codebase where I have lots of local branches on several repositories of AOSP. I want to automate the process to rebase to the latest google root manifest. For a given repository of AOSP I want to calculate the patches I have to rebase. I want to calculate the list of patches that are branching out from the old root manifest and then apply them on top of the new manifest. I tried
git rev-list --no-merges --pretty=oneline sha1 ^sha2
for this purpose, where sha1 is the branch's top SHA and and sha2 is the new SHA from the new root manifest. However apart from the right patches listed on the top there are also quite a few patches that are listed thereafter. In the real patch procession they come long after and should logically be part of both branches because the old root manifest is parent of the new root manifest. However they seem to appear on one side only. For instance for system/core:
31e75fab34280152c22b90c7d140877699eaf18d add the impementation of delete_key, delete_all_key
f4067b287c088dafdbd94533e26f6a4d59269da7 WORKAROUND: exit from handle_packet() when adb offline.
b2a79c003ccdc3b5b352e7e25dd9a95a26e5c5e7 [REVERTME] Add vendor/{LIB}/hw as default vendor lib search path
92dc3f6c0e50233eabe8cdb62d8efdda2ac6684b add access libgui for vendor module
8dc03f6e256b34ef08bcfce04e6be91f45e4f6d5 Revert "Restore "Add UID parameter to authentication token""
10a8b78a57278bd199b32d954ad7441e37f11649 If enablefilecrypto or init_user0 fails, reboot into recovery.
701b26ae09a9da0a814a5e8905b4a28293e50de9 Revert "Add UID parameter to authentication token"
dc9ae90d61129501a80323c14b2673003ecf065b Fixing app compat issue b/72143978
244f5f389c2ff3bdfe5e5859e4057d93df2c1e26 Revert "Have property_service create a serialized property_contexts file"
48f39b6f40327d96fcfe1eb8ca5ae990a0bad771 Revert "Prevent vendors from accessing private VNDK libs"
726a81d4e5b1a8d80de7ef1baf17b9393eda461e Fix media on W/T
Patches
31e75fab34280152c22b90c7d140877699eaf18d
f4067b287c088dafdbd94533e26f6a4d59269da7
b2a79c003ccdc3b5b352e7e25dd9a95a26e5c5e7
92dc3f6c0e50233eabe8cdb62d8efdda2ac6684b
would be the one on the branch and these are the patches I look for, however the next ones:
8dc03f6e256b34ef08bcfce04e6be91f45e4f6d5
10a8b78a57278bd199b32d954ad7441e37f11649
...
Are coming long after and only on one side of the patch procession. There seem to be a relation to reverts.
Question: Is there a option that I am missing for rev-list
to supress this patches (possibly related to reverts) ?