<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Wed, 2010-05-12 at 10:19 +1000, Peter Hutterer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
git status in git-1.7 always returns 0, regardless of the number of
uncommitted changes [1]. This breaks the current script. Replace with a git
diff --quiet HEAD instead, that's sufficient for our use-case here.
[1] commit 9e4b7ab6525 "git status: not "commit --dry-run" anymore"
in the git source tree
Signed-off-by: Peter Hutterer <<A HREF="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</A>>
---
release.sh | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/release.sh b/release.sh
index c8461fc..ec52f9a 100755
--- a/release.sh
+++ b/release.sh
@@ -124,15 +124,10 @@ done
# Check for uncommitted/queued changes.
if [ "x$ignorechanges" != "x1" ]; then
set +e
- git diff --exit-code > /dev/null 2>&1
+ git diff --quiet HEAD > /dev/null 2>&1
if [ $? -ne 0 ]; then
abort_for_changes
fi
-git version 1.6.0.4
- git status > /dev/null 2>&1
- if [ $? -eq 0 ]; thengit version 1.6.0.4
- abort_for_changes
- fi
set -e
fi
</PRE>
</BLOCKQUOTE>
<BR>
The new git command works as advertised.<BR>
<BR>
Tested-by: Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>><BR>
git version 1.6.0.4<BR>
<BR>
<FONT COLOR="#1a1a1a"><TT>git status --porcelain</TT></FONT> did not work for me anyway.<BR>
<BR>
<BR>
</BODY>
</HTML>