Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: git clone NonExistentLocation

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:50:35

Stefan Naewe venit, vidit, dixit 17.02.2011 13:52:
On 2/17/2011 1:39 PM, Michael J Gruber wrote:
quoted
It is useful, and it even gives you a warning that it still might not be
what you intended. Would be funny if it were accidental. Indeed, a git
"log -S" on that warning reveals that it was introduced intentionally in

86ac751 (Allow cloning an empty repository, 2009-01-23)
OK. But that's about 'cloning an empty repository'.
'NonExistentLocation' is not empty initially - it simply does
not exist.

Contrast that to 'git clone http://url.does.not.exist'. You don't
get an empty repository in 'url.does.not.exist' after running that.
OK, the transport layer errors out in that case.

Rereading Sverre's commit message, I'm still not sure whether this case
was intended or not. The test case covers existing empty repos only. So
I'm cc'ing him and holding back by documentation patch.

Sverre, with your 86ac751, the following two are equivalent (modulo a
warning) on a nonexisting dir:

git clone dir
git init dir

Is that intentional?

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help