Jeff Sharkey | fb7b373 | 2018-08-23 22:01:53 -0600 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | LOCAL_DIR="$( dirname ${BASH_SOURCE} )" |
| 3 | |
| 4 | if git branch -vv | grep "^*" | grep "\[aosp/master" > /dev/null; then |
| 5 | # Change appears to be in AOSP |
| 6 | exit 0 |
| 7 | else |
| 8 | # Change appears to be non-AOSP; search for files |
| 9 | git show --name-only --pretty=format: $1 | grep $2 | while read file; do |
| 10 | echo |
| 11 | echo -e "\033[0;31mThe source of truth for '$file' is in AOSP.\033[0m" |
| 12 | echo |
| 13 | echo "If your change contains no confidential details, please upload and merge" |
| 14 | echo "this change at https://android-review.googlesource.com/." |
| 15 | echo |
| 16 | exit 77 |
| 17 | done |
| 18 | fi |