Re: Strange cogito behaviour

From: Andy Parkins <andyparkins@gmail.com>
Date: 2006-08-02 01:41:16
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.


> > 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Wed Aug 02 01:42:05 2006

This archive was generated by hypermail 2.1.8 : 2006-08-02 01:42:37 EST