* cloning empty repo
@ 2007-06-24 15:04 Marijn Schouten (hkBst)
2007-06-24 23:01 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-06-24 15:04 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
is there any reason why cloning an empty repository should result in an error
instead of a succesfully cloned empty repo?
Marijn
PS Please CC me
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGfogIp/VmCx0OL2wRAnYXAJ9cJAO4WsQihr6iEsEIawA9cpycQACglI8G
lofEKfuidJ1OOv12A9QPK8w=
=p344
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cloning empty repo
2007-06-24 15:04 cloning empty repo Marijn Schouten (hkBst)
@ 2007-06-24 23:01 ` Shawn O. Pearce
2007-06-28 1:32 ` Josh Triplett
0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-06-24 23:01 UTC (permalink / raw)
To: Marijn Schouten (hkBst); +Cc: git
"Marijn Schouten (hkBst)" <hkBst@gentoo.org> wrote:
> is there any reason why cloning an empty repository should result in an error
> instead of a succesfully cloned empty repo?
There's nothing to clone. The repository is empty.
If you create a Git repository using `git init` and then create
another one also using `git init` then both repositories are empty,
and an empty repository is identical to every other empty repository.
So if you want to setup an empty repository and then clone nothing,
you actually can just setup another empty repository and configure
the 'origin' remote:
mkdir a; cd a; git init; cd ..
mkdir b; cd b; git init
# now a and b are identical
git remote add origin ../a/.git
# now b is a "clone" of a's nothingness...
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cloning empty repo
2007-06-24 23:01 ` Shawn O. Pearce
@ 2007-06-28 1:32 ` Josh Triplett
0 siblings, 0 replies; 3+ messages in thread
From: Josh Triplett @ 2007-06-28 1:32 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Marijn Schouten (hkBst), git
Shawn O. Pearce wrote:
> "Marijn Schouten (hkBst)" <hkBst@gentoo.org> wrote:
>> is there any reason why cloning an empty repository should result in an error
>> instead of a succesfully cloned empty repo?
>
> There's nothing to clone. The repository is empty.
>
> If you create a Git repository using `git init` and then create
> another one also using `git init` then both repositories are empty,
> and an empty repository is identical to every other empty repository.
>
> So if you want to setup an empty repository and then clone nothing,
> you actually can just setup another empty repository and configure
> the 'origin' remote:
>
> mkdir a; cd a; git init; cd ..
>
> mkdir b; cd b; git init
> # now a and b are identical
>
> git remote add origin ../a/.git
> # now b is a "clone" of a's nothingness...
You can also simulate a clone of any other repository by using a similar
series of commands; git clone exists so that you don't have to. Why not allow
cloning an empty repository, which would give you an empty repository with the
correct origin remote?
- Josh Triplett
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-28 1:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-24 15:04 cloning empty repo Marijn Schouten (hkBst)
2007-06-24 23:01 ` Shawn O. Pearce
2007-06-28 1:32 ` Josh Triplett
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).