* [PATCH] repack: don't report "Nothing new to pack." if -q is given
@ 2007-07-03 8:47 Uwe Kleine-König
2007-07-03 18:19 ` Peter Baumann
2007-07-04 5:10 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2007-07-03 8:47 UTC (permalink / raw)
To: Git Mailing List
Signed-off-by: Uwe Kleine-König <ukleinek@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="$args $local $quiet $no_reuse_delta$extra"
name=$(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"
--
1.5.2.2.1451.gb0e5e
--
Uwe Kleine-König
exit vi, lesson II:
: w q ! <CR>
NB: write the current file
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] repack: don't report "Nothing new to pack." if -q is given
2007-07-03 8:47 [PATCH] repack: don't report "Nothing new to pack." if -q is given Uwe Kleine-König
@ 2007-07-03 18:19 ` Peter Baumann
2007-07-03 19:17 ` Uwe Kleine-König
2007-07-04 5:10 ` Junio C Hamano
1 sibling, 1 reply; 4+ messages in thread
From: Peter Baumann @ 2007-07-03 18:19 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: git
On Tue, Jul 03, 2007 at 10:47:58AM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <ukleinek@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="$args $local $quiet $no_reuse_delta$extra"
> name=$(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
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
the script:
if test "$quiet" != '-q'; then
echo ...
fi
-Peter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] repack: don't report "Nothing new to pack." if -q is given
2007-07-03 18:19 ` Peter Baumann
@ 2007-07-03 19:17 ` Uwe Kleine-König
0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2007-07-03 19:17 UTC (permalink / raw)
To: git
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
Peter Baumann wrote:
> On Tue, Jul 03, 2007 at 10:47:58AM +0200, Uwe Kleine-König wrote:
> > 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 used in
> the script:
>
> if test "$quiet" != '-q'; then
> echo ...
> fi
actually I meant test -z "$quiet", but test "$quiet" != '-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="$args $local $quiet $no_reuse_delta$extra"
name=$(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"
--
1.5.2.2.1451.gb0e5e
> > 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="$args $local $quiet $no_reuse_delta$extra"
> > name=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
> -Peter
>
--
Uwe Kleine-König
$ dc -e "5735816763073014741799356604682P"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] repack: don't report "Nothing new to pack." if -q is given
2007-07-03 8:47 [PATCH] repack: don't report "Nothing new to pack." if -q is given Uwe Kleine-König
2007-07-03 18:19 ` Peter Baumann
@ 2007-07-04 5:10 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2007-07-04 5:10 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Git Mailing List
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> writes:
> Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
> ---
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-04 5:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03 8:47 [PATCH] repack: don't report "Nothing new to pack." if -q is given Uwe Kleine-König
2007-07-03 18:19 ` Peter Baumann
2007-07-03 19:17 ` Uwe Kleine-König
2007-07-04 5:10 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).