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