On Friday, December 26, 2014 9:07:06 PM UTC+1, Dima Pasechnik wrote:
>
> On 2014-12-26, Volker Braun <vbrau...@gmail.com <javascript:>> wrote: 
> > ------=_Part_5531_1685050387.1419616059330 
> > Content-Type: multipart/alternative; 
> >         boundary="----=_Part_5532_1775001320.1419616059330" 
> > 
> > ------=_Part_5532_1775001320.1419616059330 
> > Content-Type: text/plain; charset=UTF-8 
> > 
> > On Friday, December 26, 2014 6:23:43 PM UTC+1, Dima Pasechnik wrote: 
> >> 
> >> By the way, I noticed some change in the behaviour of trac git server; 
> >> it seems that fetching u/foo/bar automatically results in 
> >> creation of a local branch trac/u/foo/bar. 
> > 
> > 
> > No it doesn't. Local branches would be in the output of "git branch". 
> The 
> > fetched branch is of course know to the local repo under a name, e.g. in 
> > the output of "git ls-remote trac". 
>
> but then what does the following mean: 
>
> $ git fetch trac u/dimpase/16929 
> remote: Counting objects: 21, done. 
> remote: Compressing objects: 100% (12/12), done. 
> remote: Total 14 (delta 9), reused 7 (delta 2) 
> Unpacking objects: 100% (14/14), done. 
> From git://trac.sagemath.org/sage 
>  * branch            u/dimpase/16929 -> FETCH_HEAD 
>  * [new branch]      u/dimpase/16929 -> trac/u/dimpase/16929 
>
> $ git remote -v 
> origin        https://github.com/sagemath/sage.git (fetch) 
> origin        https://github.com/sagemath/sage.git (push) 
> trac        git://trac.sagemath.org/sage.git (fetch) 
> trac        g...@trac.sagemath.org:sage.git (push) 
>
>
> What does this [new branch] mean? 
>
> Note that now I can e.g. do 
>
> $ git checkout trac/u/dimpase/16929 
> Note: checking out 'trac/u/dimpase/16929'. 
>
> You are in 'detached HEAD' state. You can look around, make experimental 
> changes and commit them, and you can discard any commits you make in 
> this 
> state without impacting any branches by performing another checkout. 
>
> If you want to create a new branch to retain commits you create, you may 
> do so (now or later) by using -b with the checkout command again. 
> Example: 
>
>   git checkout -b new_branch_name 
>
> HEAD is now at a576d91... Ported Ingo's code to Sage 6.5.beta1 
>
>
> That is to say, 'trac/u/dimpase/16929' really got created. 
>
> Dima 
>
> You fetched a remote branch, so git made a local copy of the commits which 
it is made of (what else could it do?).
Then git decided to give the tip commit two names: "FETCH_HEAD" (because 
that's what you just fetched) and <remote>/<branch> (that's kind of 
logical).

I kind of agree with Volker that no branch really got created.
You don't see it when you issue "git branch" without further verbosity.
I'm not even sure that if you don't create a real local branch this 
"locally copied remote branch" would survive garbage collection ("git gc").

Note that

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to