1*4b9c6d91SCole Faust#!/usr/bin/env bash 2*4b9c6d91SCole Faust 3*4b9c6d91SCole Faustif git log -n 1 --format='%B' $1 | grep -q -E "^Ignore-Upstream-First: .+" ; then 4*4b9c6d91SCole Faust # Change is explicitly marked as ok to skip upstream 5*4b9c6d91SCole Faust exit 0 6*4b9c6d91SCole Faustelif git log -n 1 --format='%s' $1 | grep -q -E "^(UPSTREAM|Upstream): .+" ; then 7*4b9c6d91SCole Faust # Change is explicitly marked as coming from the upstream 8*4b9c6d91SCole Faust exit 0 9*4b9c6d91SCole Faustfi 10*4b9c6d91SCole Faust 11*4b9c6d91SCole Faustecho "WARNING: Here is not the upstream." 12*4b9c6d91SCole Faustecho "" 13*4b9c6d91SCole Faustecho "Do not submit changes to this repository directly. Please submit changes to upstream" 14*4b9c6d91SCole Faustecho "from https://chromium-review.googlesource.com/q/project:chromiumos/platform/minijail" 15*4b9c6d91SCole Faustecho "" 16*4b9c6d91SCole Faustecho "If the change is from the upstream, please prepend \"UPSTREAM: \" to the subject." 17*4b9c6d91SCole Faustecho "" 18*4b9c6d91SCole Faustecho "If indeed necessary, please add \"Ignore-Upstream-First: <reason>\" to commit message" 19*4b9c6d91SCole Faustecho "to bypass." 20*4b9c6d91SCole Faust 21*4b9c6d91SCole Faustexit 1 22