blob: 29bf74c7a8b98f9543b968719be12725eb2610af [file] [log] [blame]
Jeff Sharkeyfb7b3732018-08-23 22:01:53 -06001#!/bin/bash
2LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
3
4if git branch -vv | grep "^*" | grep "\[aosp/master" > /dev/null; then
5 # Change appears to be in AOSP
6 exit 0
7else
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
18fi