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