Re: git clone NonExistentLocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Naewe venit, vidit, dixit 17.02.2011 10:01:
> Hi.
> 
> If I do:
> 
>  $ uname -a
> Linux as100897 2.6.26-2-686 #1 SMP Thu Nov 25 01:53:57 UTC 2010 i686 GNU/Linux
>  $ git version
> git version 1.7.4.1
>  $ ls -l NonExistentLocation
> ls: cannot access NonExistentLocation: No such file or directory
>  $ git clone NonExistentLocation
> Cloning into NonExistentLocation...
> warning: You appear to have cloned an empty repository.
>  $
> 
> I get a new (empty) git repository in 'NonExistentLocation':
> 
>  $ tree -a NonExistentLocation
> NonExistentLocation
> `-- .git
>     |-- HEAD
>     |-- branches
>     |-- config
>     |-- description
>     |-- hooks
>     |   |-- applypatch-msg.sample
>     |   |-- commit-msg.sample
>     |   |-- post-commit.sample
>     |   |-- post-receive.sample
>     |   |-- post-update.sample
>     |   |-- pre-applypatch.sample
>     |   |-- pre-commit.sample
>     |   |-- pre-rebase.sample
>     |   |-- prepare-commit-msg.sample
>     |   `-- update.sample
>     |-- info
>     |   `-- exclude
>     |-- objects
>     |   |-- info
>     |   `-- pack
>     `-- refs
>         |-- heads
>         `-- tags
> 
> 10 directories, 14 files
> 
> Is this the intended behaviour ?
> 
> Thanks,
>   Stefan

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)

Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]