git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cogito "origin" vs. HEAD

From
BHBenjamin Herrenschmidt <benh@kernel.crashing.org>
Date
May 3, 2005, 23:49 UTC
Message-ID
<1115164160.7627.55.camel@gaston>
In-Reply-To
<20050503094723.GA22436@pasky.ji.cz>
On Tue, 2005-05-03 at 11:47 +0200, Petr Baudis wrote:
Show 27 quoted lines
> Dear diary, on Tue, May 03, 2005 at 09:13:28AM CEST, I got a letter
> where Benjamin Herrenschmidt <benh@kernel.crashing.org> told me that...
> > > when accessing the remote repository, Cogito always looks for remote
> > > refs/heads/master first - if that one isn't there, it takes HEAD, but
> > > there is no correlation between the local and remote branch name. If you
> > > want to fetch a different branch from the remote repository, use the
> > > fragment identifier (see cg-help cg-branch-add).
> > 
> > Ok, that I'm getting. So then, what happen of my local
> > refs/heads/<branchname> and refs/heads/master/ ? I'm still a bit
> > confused by the whole branch mecanism... It's my understanding than when
> > I cg-init, it creates both "master" (a head without matching branch)
> > and "origin" (a branch  + a head) both having the same sha1. It also
> > checks out the tree.
> > 
> > Now, when I cg-update origin, what happens exactly ? I mean, I know it's
> > pulls all objects, then get the master from the remote pointed by the
> > origin branch, but then, I suppose it updates both my local "origin" and
> > my local "master" pointer, right ? I mean, they are always in sync ? Or
> > is this related to what branch my current checkout is tracking ?
> 
> They are in sync as long as you update only from that given branch.
> At the moment you do a local commit, they get out of sync, at least
> until your master branch is merged to the origin branch on the other
> side. Every cg-update will then generate a merging commit, so it will
> look like this:
> > .../...
Thanks for that detailed explanation !
Ben.
Previous: Petr Baudis
Message 6 of 6 in “cogito "origin" vs. HEAD”
  1. Benjamin HerrenschmidtMay 3, 2005
  2. Petr BaudisMay 3, 2005
  3. Benjamin HerrenschmidtMay 3, 2005
  4. Alexey NezhdanovMay 3, 2005
  5. Petr BaudisMay 3, 2005
  6. Benjamin HerrenschmidtMay 3, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.