Subject: Re: git bug? + question

From: Andy Whitcroft <[email-masked]>
Date: Mon, 06 Nov 2006 12:32:27 +0000

Josef Weidendorfer wrote:
> On Monday 06 November 2006 10:53, Andy Whitcroft wrote:
>> Josef Weidendorfer wrote:
>>> On Saturday 04 November 2006 06:03, Shawn Pearce wrote:
>>>> After reading your reply you are probably correct.  I can see there
>>>> may be workflows that want every remote branch also created as a
>>>> local branch.
>>>>
>>>> I could certainly live with a command line option to clone, e.g.:
>>>>
>>>> 	git clone --only vmdvt,vmtip user@host:/path...
>>> Still missing here: What branch should be checked out after
>>> cloning?
>> Does any need to be checked out?
> 
> We should not change existing behavior. IMHO, checking out a branch is
> mostly the right thing to do. Of course, you often want to specify which one.
> The current requirement for a master branch in the origin repository
> is really bad, as it obviously requires ugly workarounds in some cases
> (and totally confuse newbies in such use cases).

We are not changing existing behaviour, if we do not check anything out
only when specifying '--only'.
> 
>> Or perhap I should put it another way, 
>> when we make a virgin repository we default to master checked out but
>> its not joined to the DAG.
> 
> I do not understand this. By creating a local branch, the commit DAG
> is never changed.

In a virgin repository there is no DAG to speak of and master doesn't
really point anywhere until the first commit.  I was proposing that when
--only is specified, we just leave things as they are.  The master half
pointing into the zero element DAG we have in an entirely empty repo.
The new unconnected DAG or DAG's we have downloaded in the clone will be
attached to their respective branch names.