Gentoo Archives: gentoo-dev

From: Georgy Yakovlev <ya@×××××××.net>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Gentoo Overlay Git: Feature Branches
Date: Thu, 01 Feb 2018 05:38:37
Message-Id: 5723234.YZVCm6kEo9@reaper
In Reply to: Re: [gentoo-dev] Gentoo Overlay Git: Feature Branches by "Robin H. Johnson"
1 On Wednesday, January 31, 2018 9:31:02 PM PST Robin H. Johnson wrote:
2 > On Wed, Jan 31, 2018 at 09:32:39PM -0500, Lucas Ramage wrote:
3 > > Hello,
4 > >
5 > > Is there a way to specify a branch in repos.conf/overlay_name.conf?
6 >
7 > The source of Portage's pym/portage/sync/modules/git/git.py contains
8 > this comment:
9 > def update(self):
10 > ''' Update existing git repository, and ignore the syncuri. We are
11 > going to trust the user and assume that the user is in the branch
12 > that he/she wants updated. We'll let the user manage branches with
13 > git directly.
14 > '''
15 >
16 > To that end, I think the answer is no.
17 >
18 I answered the initial question off-list, copying the list this time.
19 It's actually it's possible.
20
21 sync-git-clone-extra-opts = -b branchname
22
23 will clone only single branch and will create a shallow clone.
24 all the future syncs will pull this branch as explained above in the source
25 code snippet.
26
27 > If this were to change, there are a bunch of questions that would need
28 > agreement in how they are answered: - if the repo's remote URI has changed,
29 > should we update the git checkout's remote URI from sync-uri? (what if
30 > there are multiple remotes in the checkout?) - if the repo's branch has
31 > changed in the config, should we update the checkout's branch?