From e1b3c1f0999403a4bc4ad922257996cc8c0b4c09 Mon Sep 17 00:00:00 2001
From: Ihar Hrachyshka <ihrachys@redhat.com>
Date: Mon, 23 Feb 2015 12:01:38 +0100
Subject: [PATCH] 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
---
 tools/integration.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/integration.sh b/tools/integration.sh
index 64272fa5da..fb647f20ba 100644
--- a/tools/integration.sh
+++ b/tools/integration.sh
@@ -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