Make sure not to revert local changes.

"git diff --quiet" has a bug ignoring local changes if there's a
unchanged file with a newer timestamp.  This patch works around
the bug.

Change-Id: I0ddc24e0f7af21287c43c1e04dd166ebff6f2dca
Closes-Bug: 1264422
This commit is contained in:
IWAMOTO Toshihiro 2014-01-23 12:02:34 +09:00
parent 6d323f43b4
commit 0b8f6e0fbb

View File

@ -1301,7 +1301,8 @@ function setup_develop() {
echo "cd $REQUIREMENTS_DIR; $SUDO_CMD python update.py $project_dir"
# Don't update repo if local changes exist
(cd $project_dir && git diff --quiet)
# Don't use buggy "git diff --quiet"
(cd $project_dir && git diff --exit-code >/dev/null)
local update_requirements=$?
if [ $update_requirements -eq 0 ]; then