* Completion message for git-clone?
@ 2008-02-08 3:09 Ian Dees
2008-02-08 8:29 ` Jeff King
2008-02-08 10:01 ` Jakub Narebski
0 siblings, 2 replies; 4+ messages in thread
From: Ian Dees @ 2008-02-08 3:09 UTC (permalink / raw)
To: git
Hi, all. Upon cloning a repository, the initial message reads:
Initialized empty Git repository in path/to/new-repo/.git
0 blocks
I'd wager "empty" means, "empty because Git is about to populate it."
Even so, this wording could be a bit surprising to new adopters,
especially coupled with the "0 blocks" suffix (is it really creating
hardlinks on NTFS?). The impression is that the clone didn't work.
The impression is, of course, eventually dispelled by looking inside
the new directory. Is there a way to clarify the overall status of
the clone operation?
One other minor thing I noticed while futzing with clones: if you try
to clone an empty repository, you get the same "Initialized empty
repository" message, even though no such second directory is created.
I'm not suggesting Git should suddenly start allowing empty cloning,
but perhaps a "Empty repository; skipping clone" message would be
helpful.
--Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Completion message for git-clone?
2008-02-08 3:09 Completion message for git-clone? Ian Dees
@ 2008-02-08 8:29 ` Jeff King
2008-02-08 10:01 ` Jakub Narebski
1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2008-02-08 8:29 UTC (permalink / raw)
To: Ian Dees; +Cc: git
On Thu, Feb 07, 2008 at 07:09:54PM -0800, Ian Dees wrote:
> Initialized empty Git repository in path/to/new-repo/.git
> 0 blocks
>
> I'd wager "empty" means, "empty because Git is about to populate it."
> Even so, this wording could be a bit surprising to new adopters,
> especially coupled with the "0 blocks" suffix (is it really creating
> hardlinks on NTFS?). The impression is that the clone didn't work.
> The impression is, of course, eventually dispelled by looking inside
> the new directory. Is there a way to clarify the overall status of
> the clone operation?
The '0 blocks' actually comes from cpio, because it's hardlinking. I
complained about this when it first appeared, but getting cpio to print
something sane is a bit tricky. However, there has been talk of making
git-clone a builtin in the near future, and I suspect it will be much
easier to generate more user-friendly muessages then. So it is probably
simplest to hold your breath and see what comes of that effort (though I
can't seem to find any mention of it in the archives...)
> One other minor thing I noticed while futzing with clones: if you try
> to clone an empty repository, you get the same "Initialized empty
> repository" message, even though no such second directory is created.
> I'm not suggesting Git should suddenly start allowing empty cloning,
> but perhaps a "Empty repository; skipping clone" message would be
> helpful.
What version are you using? This should be fixed in v1.5.4 (see commit
ef4cffde).
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Completion message for git-clone?
2008-02-08 3:09 Completion message for git-clone? Ian Dees
2008-02-08 8:29 ` Jeff King
@ 2008-02-08 10:01 ` Jakub Narebski
2008-02-08 16:23 ` Ian Dees
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-02-08 10:01 UTC (permalink / raw)
To: Ian Dees; +Cc: git
"Ian Dees" <undees@gmail.com> writes:
> Hi, all. Upon cloning a repository, the initial message reads:
>
> Initialized empty Git repository in path/to/new-repo/.git
> 0 blocks
>
> I'd wager "empty" means, "empty because Git is about to populate it."
> Even so, this wording could be a bit surprising to new adopters,
> especially coupled with the "0 blocks" suffix (is it really creating
> hardlinks on NTFS?). The impression is that the clone didn't work.
> The impression is, of course, eventually dispelled by looking inside
> the new directory. Is there a way to clarify the overall status of
> the clone operation?
This is caused by the fact that for now git-clone is a shell script,
which creates empty repository using git-init (The "Initialized..."
message is from git-init), then configures it and populates it.
For local clones it uses cpio for hardlinking: the "0 blocks" is
from cpio.
It shouldn't be hard to add message which would confirm successful
completion of the clone if it is local clone; the messages from
git-fetch are I think enough indication that clone succeeded...
but perhaps we would want to add final message anyway.
Nevertheless git-clone waits to be rewritten in C anyway, so
there is no much initiative to improve shell version. The stumbling
blocks are as far as I can remember moving detection of which branch
is currently checked out to git-remote, and optionally adding
symbolic-ref extension to git transfer protocol for git to not have to
guess which branch is HEAD.
> One other minor thing I noticed while futzing with clones: if you try
> to clone an empty repository, you get the same "Initialized empty
> repository" message, even though no such second directory is created.
> I'm not suggesting Git should suddenly start allowing empty cloning,
> but perhaps a "Empty repository; skipping clone" message would be
> helpful.
$ git clone a b
Initialized empty Git repository in /tmp/b/.git/
fatal: cannot clone empty repository
$ git --version
git version 1.5.4
Perhaps git should check if there is anything to clone _before_
git-init, or do not remove empty directory after failing to fetch.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Completion message for git-clone?
2008-02-08 10:01 ` Jakub Narebski
@ 2008-02-08 16:23 ` Ian Dees
0 siblings, 0 replies; 4+ messages in thread
From: Ian Dees @ 2008-02-08 16:23 UTC (permalink / raw)
To: git; +Cc: peff, jnareb
Hi, all.
Thanks, Jeff and Jakub, for the clarifications.
Jakub writes:
> Nevertheless git-clone waits to be rewritten in C anyway, so
> there is no much initiative to improve shell version
I agree with you. If it's about to be replaced, there's not much
point in making a wording change to the shell script.
> Perhaps git should check if there is anything to clone _before_
> git-init, or do not remove empty directory after failing to fetch.
I'm not sure that's necessary, as long as that new message is there in
1.5.4. I'll hang tight for my distro to pick it up.
--Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-08 16:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 3:09 Completion message for git-clone? Ian Dees
2008-02-08 8:29 ` Jeff King
2008-02-08 10:01 ` Jakub Narebski
2008-02-08 16:23 ` Ian Dees
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).