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:
parent
6d323f43b4
commit
0b8f6e0fbb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user