On Wednesday, January 31, 2018 9:31:02 PM PST Robin H. Johnson wrote:
> On Wed, Jan 31, 2018 at 09:32:39PM -0500, Lucas Ramage wrote:
> > Hello,
> > 
> > Is there a way to specify a branch in repos.conf/overlay_name.conf?
> 
> The source of Portage's pym/portage/sync/modules/git/git.py contains
> this comment:
> def update(self):
>         ''' Update existing git repository, and ignore the syncuri. We are
>         going to trust the user and assume that the user is in the branch
>         that he/she wants updated. We'll let the user manage branches with
>         git directly.
>         '''
> 
> To that end, I think the answer is no.
> 
I answered the initial question off-list, copying the list this time.
It's actually it's possible.

    sync-git-clone-extra-opts  = -b branchname

will clone only single branch and will create a shallow clone.
all the future  syncs will pull this branch as explained above in the source 
code snippet.

> If this were to change, there are a bunch of questions that would need
> agreement in how they are answered: - if the repo's remote URI has changed,
> should we update the git checkout's remote URI from sync-uri? (what if
> there are multiple remotes in the checkout?) - if the repo's branch has
> changed in the config, should we update the checkout's branch?

Reply via email to