1#!/bin/bash 2# Copyright (c) 2010 The Chromium Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6script=$(readlink $0) 7source $(dirname ${script:-$0})/git-utils.sh 8 9old_ref=$1 # Previous HEAD. 10new_ref=$2 # Current HEAD. 11branch_switch=$3 # Whether we switched branches. 12 13if [ $old_ref == $new_ref ]; then 14 if ! git diff-index --quiet HEAD $(git rev-parse --show-cdup)DEPS; then 15 warn "DEPS has local modifications; do you need to re-run gclient sync?" 16 fi 17else 18 if git diff-tree $old_ref $new_ref | grep -qs $'\tDEPS$'; then 19 warn "DEPS has changed; you probably need to re-run gclient sync." 20 fi 21fi 22 23