summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Ferris <cferris@google.com> 2021-05-18 23:22:55 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-05-18 23:22:55 +0000
commit6733d0ef8ab69598bad0e4c7527d6e92fc6039dc (patch)
tree32936c3ab2ee5e86558e68e5aadcff463c4a3913
parent719831b94860dd97e9f3d71127598aab2b8b40d5 (diff)
parent9510033467ccbcf64d9921ec1419da62b0050db0 (diff)
Merge "Add a cherry-pick exception." am: 9510033467
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1711190 Change-Id: I5263965d8252b7bddfafe7b51ba0456738214426
-rwxr-xr-xtools/aosp/aosp_sha.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/aosp/aosp_sha.sh b/tools/aosp/aosp_sha.sh
index f25fcdcb7479..514f17a042bc 100755
--- a/tools/aosp/aosp_sha.sh
+++ b/tools/aosp/aosp_sha.sh
@@ -5,7 +5,21 @@ if git branch -vv | grep -q -P "^\*[^\[]+\[aosp/"; then
# Change appears to be in AOSP
exit 0
else
- # Change appears to be non-AOSP; search for files
+ # Change appears to be non-AOSP.
+
+ # If this is a cherry-pick, then allow it.
+ cherrypick=0
+ while read -r line ; do
+ if [[ $line =~ cherry\ picked\ from ]] ; then
+ (( cherrypick++ ))
+ fi
+ done < <(git show $1)
+ if (( cherrypick != 0 )); then
+ # This is a cherry-pick, so allow it.
+ exit 0
+ fi
+
+ # See if any files are affected.
count=0
while read -r file ; do
if (( count == 0 )); then