On Mon, May 24, 2010 at 10:21:43PM +0200, Uwe Kleine-König wrote: > Hello James, > > On Sun, May 16, 2010 at 08:51:38AM +0200, Uwe Kleine-König wrote: > > diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk > > index f83caa6..744b853 100644 > > --- a/debian/tg2quilt.mk > > +++ b/debian/tg2quilt.mk > > @@ -128,7 +128,8 @@ else > > 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; \ > > > Did you test this patch and did it help? I'm a bit unsure what to > prefer (i.e. my patch or s/status/commit --dry-run/).
“git commit --dry-run -a >/dev/null” returns 0 if there are changes to commit, 1 otherwise. So, both that and the above patch look like valid methods to use. FWIW, other git commands seem to prefer the diff-files/diff-index approach. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
signature.asc
Description: Digital signature