From 0b8f6e0fbba961de04d95ff0e06e515d1ea3ea8b Mon Sep 17 00:00:00 2001 From: IWAMOTO Toshihiro Date: Thu, 23 Jan 2014 12:02:34 +0900 Subject: [PATCH] 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 --- functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 92b61ed974..eb92a6c615 100644 --- a/functions +++ b/functions @@ -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