From: Petr Baudis Date: Thu, 10 Nov 2005 23:40:29 GMT Subject: Re: [PATCH] cg-pull to stop treating "master" specially, fix fetch_local for .git/HEAD Message-ID: <20051110234029.GE30496@pasky.or.cz> In-Reply-To: <200511110026.18324.Josef.Weidendorfer@gmx.de> Dear diary, on Fri, Nov 11, 2005 at 12:26:18AM CET, I got a letter where Josef Weidendorfer said that... > On Tuesday 23 August 2005 23:33, Pavel Roskin wrote: > > Hello! > > > > This patch changes cg-pull so that if the branch is not specified, it > > takes origin's .git/HEAD without first trying .git/refs/heads/master. > > This removes preferential treatment of the "master" branch, allowing the > > upstream to use another name for the default branch. To get the master > > branch, users would have to append "#master" to the URL. > > I think this is wrong. > > Why would anybody want to fetch the current upstream HEAD at cg-pull > time? If you do this, and you have no control on the upstream > repository, "origin" will jump randomly around after cg-pull, depending > on the current HEAD of the origin repository. In public repositories, you usually set the HEAD once and it stays there, or when you switch it, you are really careful about it. > Besides, this is a incompatible change in cg-pull behavior: I am sure that > a lot of people did a cg-clone in the past without any specific remote branch, > and expect that cg-pull will update their origin to the remote "master". > Now, if they update to a new Cogito with this patch, the next cg-pull > sometimes will rebase their origin to another random branch, depending > on remote HEAD ?! See above. The remote HEAD is supposed to be generally stable for public repositories, pointing to the _default_ head for public consumption. If you want something specific, specify it by the #branchname. > Or am I missing something here? That this is from 23 August and this change was in Cogito for several major releases and noone ever complained. ;-) -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.