chiark / gitweb /
tg2quilt.mk: don't call git-status with git-commit options
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 16 May 2010 06:51:38 +0000 (08:51 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 7 Jun 2010 08:26:02 +0000 (10:26 +0200)
git-status older than v1.7.0-rc0~137^2~17 used to take the same options
as git-commit.  So reimplement the needed logic using plumbing.  An
alternative would be using git commit --dry-run.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: James Vega <jamessan@debian.org>
Closes: http://bugs.debian.org/581582
debian/tg2quilt.mk

index f83caa6701f95fb6b2a540c24e53ebb877b78a76..744b853a4e41a156748e41e6135851c38641eabc 100644 (file)
@@ -128,7 +128,8 @@ else
          echo "E: please unapply (pop) all patches and try again." >&2; \
          false; \
        fi
          echo "E: please unapply (pop) all patches and try again." >&2; \
          false; \
        fi
-       @if git status -am. >/dev/null; then \
+       @git update-index -q --ignore-submodules --refresh
+       @if git diff-index --quiet --cached HEAD --ignore-submodules -- > /dev/null || git diff-files --quiet --ignore-submodules > /dev/null; then \
          echo "E: there are uncommitted changes in the working directory." >&2; \
          echo "E: please commit or revert all changes." >&2; \
          false; \
          echo "E: there are uncommitted changes in the working directory." >&2; \
          echo "E: please commit or revert all changes." >&2; \
          false; \