Re: Cloning empty repositories, was Re: What is the idea for bare repositories?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Cloning empty repositories, was Re: What is the idea for bare repositories?

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:43:50

Brian Gernhardt [off-list ref] writes:
On Nov 13, 2007, at 5:50 AM, Matthieu Moy wrote:
quoted
While clone normally does a bit more:

[remote "origin"]
       url = /tmp/git1/.git
       fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
       remote = origin
       merge = refs/heads/master
But how is clone expected to do that when the origin is an empty
repo?  There is no branch for it to track, and automagically setting
it to master is bogus because then it's tracking something that
doesn't exist.
An implementation of that would probably need to special-case the
empty repository. But an empty repository is already a special case.
HEAD already points to master, and master is already hardcoded here:

$ cat .git/HEAD 
ref: refs/heads/master

So, it's possible for HEAD to point to a branch which doesn't exist
yet, it's possible to commit to a branch which doesn't exist yet. It
would make sense to extend that to allow a remote to point to a branch
which doesn't exist either.

But don't get me wrong: I probably won't implement that myself, so I
can't _ask_ people to do it for me. I would just appreciate if people
stopped calling me (and other users interested in a sane empty clone
behavior) idiot because I think it would make sense to do it.

-- 
Matthieu

Re: Cloning empty repositories, was Re: What is the idea for bare repositories?

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:50

Hi,

On Tue, 13 Nov 2007, Matthieu Moy wrote:
I would just appreciate if people stopped calling me (and other users 
interested in a sane empty clone behavior) idiot because I think it 
would make sense to do it.
Oh, come on.  Nobody called _you_ idiot.

But I illustrated that cloning from an empty repository makes no sense.

There is a huge difference between calling somebody an idiot on the one 
side, and investing some time to help somebody who has a suboptimal 
workflow on the other one.

But I fear that you took my help as a personal attack, and as a 
consequence you feel insulted, and I wasted my precious time.

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