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

Re: Strange cogito behaviour

From
APAndy Parkins <andyparkins@gmail.com>
Date
Aug 1, 2006, 15:41 UTC
Message-ID
<200608011641.20077.andyparkins@gmail.com>
In-Reply-To
<20060801151258.GB3923@coredump.intra.peff.net>
On Tuesday 2006 August 01 16:12, Jeff King wrote:
> A cogito fetch without a branch specifier defaults to the remote HEAD,
> not master.  This is the documented behavior (see cg-branch-add(1)). I
> agree it is confusing (I also thought it was a bug until I looked it up
Fair enough.  If it is working as intended, then I have no complaint.
Show 9 quoted lines
> > The script then continues with
> >  * Switch repo1 back to master branch
> >  * Update repo2
> > This time repo2 doesn't change.  So I'm more confused :-)
>
> This is because repo2's master is already at the branch, and repo1 is a
> subset of that history. There is no need to merge since repo2 already
> contains all of the commits in repo1 (plus another one which is only on
> the branch in repo1).
I think I see now.  repo2 is neither repo1#master nor repo1#branch because it 
actually went like this:
 * repo1 cloned to repo2, repo2#master is repo1#master
 * repo2 fetches repo1#branch and /merges/ those changes
 * repo1#HEAD switched to HEAD=master
 * repo2 fetch does nothing because repo2 is actually
   repo1#master + repo1#branch, hence is newer than both
   repo1#master and repo1#branch
That explanation seems to fit exactly with the observed results, so would seem 
to be plausible.

Thank you for your help; I of course withdraw my bug report and apologise for bothering you all :-)

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Jeff King
Message 3 of 3 in “Strange cogito behaviour”
  1. Andy ParkinsAug 1, 2006
  2. Jeff KingAug 1, 2006
  3. Andy ParkinsAug 1, 2006

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.