Re: Strange cogito behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 01, 2006 at 10:53:24AM +0100, Andy Parkins wrote:

> It does the following:
>  * Create a repository, repo1, add a file to it
>  * Create a branch inside repo1 and change the file in it
>  * Switches repo1 to master branch
>  * Clones repo1 to repo2
>  * Switches repo1 to alternate branch
>  * Updates repo2
> 
> The odd behaviour is that repo2 changes in the update to show the branch 
> contents in the working copy.  The only actions that has happened in repo1 is 

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
:) ). If you want to always fetch from the master, you must say so
explicitly:
  $ cg-clone repo1#master repo2

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

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]