* [PATCH] git-clone: use cpio's --quiet flag
@ 2007-08-04 7:03 Jeff King
2007-08-04 15:36 ` Johannes Schindelin
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2007-08-04 7:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Without this flag, cpio prints the number of blocks copied,
leading to the somewhat confusing git-clone output:
$ git-clone foo bar
Initialized empty Git repository in ...
0 blocks
Signed-off-by: Jeff King <peff@peff.net>
---
This is obviously on top of the jc/clone topic in next.
git-clone.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 4c9b1c9..ccfc316 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -281,7 +281,8 @@ yes)
fi
fi &&
cd "$repo" &&
- find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
+ find objects -depth -print | cpio --quiet -pumd$l "$GIT_DIR/" \
+ || exit 1
fi
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
--
1.5.3.rc3.942.g536b2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 7:03 [PATCH] git-clone: use cpio's --quiet flag Jeff King
@ 2007-08-04 15:36 ` Johannes Schindelin
2007-08-04 16:04 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2007-08-04 15:36 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git
Hi,
On Sat, 4 Aug 2007, Jeff King wrote:
> Without this flag, cpio prints the number of blocks copied,
> leading to the somewhat confusing git-clone output:
>
> $ git-clone foo bar
> Initialized empty Git repository in ...
> 0 blocks
According to http://www.opengroup.org/onlinepubs/7990989775/xcu/cpio.html,
cpio does not know about --quiet. I think this is another GNUism...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 15:36 ` Johannes Schindelin
@ 2007-08-04 16:04 ` Jeff King
2007-08-04 17:48 ` Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2007-08-04 16:04 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git
On Sat, Aug 04, 2007 at 04:36:59PM +0100, Johannes Schindelin wrote:
> > $ git-clone foo bar
> > Initialized empty Git repository in ...
> > 0 blocks
>
> According to http://www.opengroup.org/onlinepubs/7990989775/xcu/cpio.html,
> cpio does not know about --quiet. I think this is another GNUism...
Ugh, I didn't even think to check the spec, thanks for looking (I should
have been tipped off by the presence only of a long option).
I'm not sure what the best solution is...adding --quiet makes it totally
unportable, but that message almost looks like an error. We can redirect
stderr, but then we potentially miss real errors. I guess we could grep
it out.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 16:04 ` Jeff King
@ 2007-08-04 17:48 ` Junio C Hamano
2007-08-04 17:52 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2007-08-04 17:48 UTC (permalink / raw)
To: Jeff King; +Cc: Johannes Schindelin, git
Jeff King <peff@peff.net> writes:
> On Sat, Aug 04, 2007 at 04:36:59PM +0100, Johannes Schindelin wrote:
>
>> > $ git-clone foo bar
>> > Initialized empty Git repository in ...
>> > 0 blocks
>>
>> According to http://www.opengroup.org/onlinepubs/7990989775/xcu/cpio.html,
>> cpio does not know about --quiet. I think this is another GNUism...
>
> Ugh, I didn't even think to check the spec, thanks for looking (I should
> have been tipped off by the presence only of a long option).
>
> I'm not sure what the best solution is...adding --quiet makes it totally
> unportable, but that message almost looks like an error. We can redirect
> stderr, but then we potentially miss real errors.
I was hoping that we can say that the output is analogous to the
native transport reporting "Conting objects: XXXX" and stuff...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 17:48 ` Junio C Hamano
@ 2007-08-04 17:52 ` Jeff King
2007-08-04 18:27 ` Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2007-08-04 17:52 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git
On Sat, Aug 04, 2007 at 10:48:29AM -0700, Junio C Hamano wrote:
> I was hoping that we can say that the output is analogous to the
> native transport reporting "Conting objects: XXXX" and stuff...
It always says "0 blocks" for me, which looks a bit like an error (but
the clone seems to work fine).
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 17:52 ` Jeff King
@ 2007-08-04 18:27 ` Junio C Hamano
2007-08-05 8:06 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2007-08-04 18:27 UTC (permalink / raw)
To: Jeff King; +Cc: Johannes Schindelin, git
Jeff King <peff@peff.net> writes:
> On Sat, Aug 04, 2007 at 10:48:29AM -0700, Junio C Hamano wrote:
>
>> I was hoping that we can say that the output is analogous to the
>> native transport reporting "Conting objects: XXXX" and stuff...
>
> It always says "0 blocks" for me, which looks a bit like an error (but
> the clone seems to work fine).
Try cloning across filesystem boundaries so that you do not get
a hardlink -- you will get block count of the copy ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-04 18:27 ` Junio C Hamano
@ 2007-08-05 8:06 ` Jeff King
2007-08-05 8:36 ` Junio C Hamano
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2007-08-05 8:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git
On Sat, Aug 04, 2007 at 11:27:04AM -0700, Junio C Hamano wrote:
> Try cloning across filesystem boundaries so that you do not get
> a hardlink -- you will get block count of the copy ;-)
I see, though the hardlink warning is a bit much.
$ git-clone /path/on/fs/one /path/on/fs/two
Initialized empty Git repository in /path/on/fs/two/.git/
Warning: -l asked but cannot hardlink to /path/on/fs/one/.git
36634 blocks
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-05 8:06 ` Jeff King
@ 2007-08-05 8:36 ` Junio C Hamano
2007-08-05 9:36 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2007-08-05 8:36 UTC (permalink / raw)
To: Jeff King; +Cc: Johannes Schindelin, git
Jeff King <peff@peff.net> writes:
> On Sat, Aug 04, 2007 at 11:27:04AM -0700, Junio C Hamano wrote:
>
>> Try cloning across filesystem boundaries so that you do not get
>> a hardlink -- you will get block count of the copy ;-)
>
> I see, though the hardlink warning is a bit much.
>
> $ git-clone /path/on/fs/one /path/on/fs/two
> Initialized empty Git repository in /path/on/fs/two/.git/
> Warning: -l asked but cannot hardlink to /path/on/fs/one/.git
> 36634 blocks
True; -l is not given explicitly in your example. Should be
trivial to fix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] git-clone: use cpio's --quiet flag
2007-08-05 8:36 ` Junio C Hamano
@ 2007-08-05 9:36 ` Jeff King
0 siblings, 0 replies; 9+ messages in thread
From: Jeff King @ 2007-08-05 9:36 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, git
On Sun, Aug 05, 2007 at 01:36:29AM -0700, Junio C Hamano wrote:
> > I see, though the hardlink warning is a bit much.
> >
> > $ git-clone /path/on/fs/one /path/on/fs/two
> > Initialized empty Git repository in /path/on/fs/two/.git/
> > Warning: -l asked but cannot hardlink to /path/on/fs/one/.git
> > 36634 blocks
>
> True; -l is not given explicitly in your example. Should be
> trivial to fix.
Ah, indeed, I had assumed that it came from cpio (which also uses the -l
flag!), but reading the code, it's us. Given that "-l" is now the
default, and we silently downgrade to copying anyway, I don't see the
point of having any warning at all. Unless, I guess, for those people
who are still using "-l" even though it's a noop.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-08-05 9:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-04 7:03 [PATCH] git-clone: use cpio's --quiet flag Jeff King
2007-08-04 15:36 ` Johannes Schindelin
2007-08-04 16:04 ` Jeff King
2007-08-04 17:48 ` Junio C Hamano
2007-08-04 17:52 ` Jeff King
2007-08-04 18:27 ` Junio C Hamano
2007-08-05 8:06 ` Jeff King
2007-08-05 8:36 ` Junio C Hamano
2007-08-05 9:36 ` Jeff King
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).