Discussion:
[PATCH] repack: don't report "Nothing new to pack." if -q is given
Uwe Kleine-König
2007-07-03 08:47:58 UTC
Permalink
Signed-off-by: Uwe Kleine-K=F6nig <***@informatik.uni-freiburg.de>
---
This patch is on top of maint. For master and next you need
s/name/names/.

Best regards
Uwe

git-repack.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-repack.sh b/git-repack.sh
index ddfa8b4..d980275 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -65,7 +65,9 @@ args=3D"$args $local $quiet $no_reuse_delta$extra"
name=3D$(git-pack-objects --non-empty --all --reflog $args </dev/null =
"$PACKTMP") ||
exit 1
if [ -z "$name" ]; then
- echo Nothing new to pack.
+ if test -q "$quiet"; then
+ echo Nothing new to pack.
+ fi
else
chmod a-w "$PACKTMP-$name.pack"
chmod a-w "$PACKTMP-$name.idx"
--=20
1.5.2.2.1451.gb0e5e


--=20
Uwe Kleine-K=F6nig

exit vi, lesson II:
: w q ! <CR>

NB: write the current file
Peter Baumann
2007-07-03 18:19:23 UTC
Permalink
e>
Post by Uwe Kleine-König
---
This patch is on top of maint. For master and next you need
s/name/names/.
=20
Best regards
Uwe
=20
git-repack.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
=20
diff --git a/git-repack.sh b/git-repack.sh
index ddfa8b4..d980275 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -65,7 +65,9 @@ args=3D"$args $local $quiet $no_reuse_delta$extra"
name=3D$(git-pack-objects --non-empty --all --reflog $args </dev/nul=
l "$PACKTMP") ||
Post by Uwe Kleine-König
exit 1
if [ -z "$name" ]; then
- echo Nothing new to pack.
+ if test -q "$quiet"; then
+ echo Nothing new to pack.
+ fi
This looks wrong, especially as I can't find a '-q' in the manpage of "=
test".
Perhaps you ment something like the following code, which is already us=
ed in
the script:

if test "$quiet" !=3D '-q'; then
echo ...
fi

-Peter
Uwe Kleine-König
2007-07-03 19:17:16 UTC
Permalink
Signed-off-by: Uwe Kleine-K=F6nig <***@informatik.uni-freiburg.de>
---
Post by Uwe Kleine-König
exit 1
if [ -z "$name" ]; then
- echo Nothing new to pack.
+ if test -q "$quiet"; then
+ echo Nothing new to pack.
+ fi
=20
This looks wrong, especially as I can't find a '-q' in the manpage of=
"test".
Perhaps you ment something like the following code, which is already =
used in
=20
if test "$quiet" !=3D '-q'; then
echo ...
fi
actually I meant test -z "$quiet", but test "$quiet" !=3D '-q' would be
equally good.

Thanks for noticing.

Uwe

git-repack.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-repack.sh b/git-repack.sh
index ddfa8b4..1ce2760 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -65,7 +65,9 @@ args=3D"$args $local $quiet $no_reuse_delta$extra"
name=3D$(git-pack-objects --non-empty --all --reflog $args </dev/null =
"$PACKTMP") ||
exit 1
if [ -z "$name" ]; then
- echo Nothing new to pack.
+ if test -z "$quiet"; then
+ echo Nothing new to pack.
+ fi
else
chmod a-w "$PACKTMP-$name.pack"
chmod a-w "$PACKTMP-$name.idx"
--=20
1.5.2.2.1451.gb0e5e
Post by Uwe Kleine-König
Best regards
Uwe
=20
git-repack.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
=20
diff --git a/git-repack.sh b/git-repack.sh
index ddfa8b4..d980275 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -65,7 +65,9 @@ args=3D"$args $local $quiet $no_reuse_delta$extra=
"
Post by Uwe Kleine-König
name=3D$(git-pack-objects --non-empty --all --reflog $args </dev/n=
ull "$PACKTMP") ||
-Peter
=20
--=20
Uwe Kleine-K=F6nig

$ dc -e "5735816763073014741799356604682P"
Junio C Hamano
2007-07-04 05:10:37 UTC
Permalink
g.de>
Post by Uwe Kleine-König
---
This patch is on top of maint. For master and next you need
s/name/names/.
Thanks. But I won't be applying this to 'maint' for now; I do
not think it is big enough bugfix.

Loading...