Don't use git diff --quiet to detect local change

It seems that there is a bug in (old?) versions of git, particularily in
the one that is shipped with Ubuntu Precise (1.7.9.5) that (sometimes?)
makes the exit code of git diff incorrect.

Change-Id: Id2286147529f1072fe4ceff3fc5200aeb30267a1
Related-Bug: #1264422
Related-Bug: #1410434
This commit is contained in:
Ihar Hrachyshka 2015-02-23 12:01:38 +01:00
parent 0275f5f59b
commit e1b3c1f099

@ -89,7 +89,7 @@ for PROJECT in $PROJECTS ; do
sudo chown -R $USER $REPODIR/$SHORT_PROJECT
(cd $REPODIR/requirements && python update.py $REPODIR/$SHORT_PROJECT)
pushd $REPODIR/$SHORT_PROJECT
if ! git diff --quiet ; then
if ! git diff --exit-code > /dev/null; then
git commit -a -m'Update requirements'
fi
popd