From: Yann Dirson Date: Thu, 01 Feb 2007 18:47:05 GMT Subject: Re: [PATCH 7/7] Make 'stg pull' use git-fetch and not git-pull. Message-ID: <20070201184705.GC5362@nan92-1-81-57-214-146.fbx.proxad.net> In-Reply-To: On Wed, Jan 31, 2007 at 11:44:07PM +0000, Catalin Marinas wrote: > On 29/01/07, Yann Dirson wrote: > >We introduce a new pull-does-rebase setting, as companion to pullcmd. > >This allows to use both pullcmd's that need a rebase (like git-fetch) > >and pullcmd's that do not (like git-pull). > > Thanks for the patches. I applied all of them but I have a question on this > one: > > >+ if (config.get('stgit.pull-does-rebase')): > >+ # FIXME! > >+ reset(tree_id = rev_parse(repository)) > > Why the "FIXME" here? The alternative is switch() and it might be safer. The last 2 patches, including the one with this FIXME, will need some work. In this case, we should reset to the parent branch. It currently just works because traditionnaly we use refs/heads/origin from remote "origin", and "rev-parse origin" resolves to that branch. Best regards, -- Yann