diff options
author | 2021-05-18 23:36:45 +0000 | |
---|---|---|
committer | 2021-05-18 23:36:45 +0000 | |
commit | d1172f3b0481d0a0fd5755c7f795d245873c2976 (patch) | |
tree | 2bb3ef8e1a175322a68db705a5a0c7ddc3132c0d | |
parent | 832ce8f9252cac92cd8a09f992362a861715554d (diff) | |
parent | 6733d0ef8ab69598bad0e4c7527d6e92fc6039dc (diff) |
Merge "Add a cherry-pick exception." am: 9510033467 am: 6733d0ef8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1711190
Change-Id: I81ac1a60ab33b059488109f1aa7efada363bb3ff
-rwxr-xr-x | tools/aosp/aosp_sha.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/aosp/aosp_sha.sh b/tools/aosp/aosp_sha.sh index 99aaa3c4d6e5..5154788fdcb6 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 |