public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Gentoo Overlay Git: Feature Branches
@ 2018-02-01  2:32 Lucas Ramage
  2018-02-01  5:31 ` Robin H. Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Ramage @ 2018-02-01  2:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Hello,

Is there a way to specify a branch in repos.conf/overlay_name.conf?

[rage]
location = /usr/local/portage/rage
sync-type = git
sync-uri = https://github.com/lramage94/overlay.git^feature/beta-packages
priority=9999
EOF

Something like this?

Thanks

-- 

[image: Visit online journal] <https://lramage94.github.io>

*Lucas Ramage* / Software Engineer
ramage.lucas@openmailbox.org / (941) 404-6794

*PGP Fingerprint* / Learn More <https://emailselfdefense.fsf.org/en/>
EAE7 45DF 818D 4948 DDA7 0F44 F52A 5A96 7B9B 6FB7
<https://pgp.mit.edu/pks/lookup?op=get&search=0xF52A5A967B9B6FB7>

*Visit online journal*
http://lramage94.github.io <https://lramage94.github.io>

[image: Github]  <https://github.com/lramage94>[image: Linkedin]
<https://www.linkedin.com/in/lramage94>

[-- Attachment #2: Type: text/html, Size: 3303 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Gentoo Overlay Git: Feature Branches
  2018-02-01  2:32 [gentoo-dev] Gentoo Overlay Git: Feature Branches Lucas Ramage
@ 2018-02-01  5:31 ` Robin H. Johnson
  2018-02-01  5:38   ` Georgy Yakovlev
  0 siblings, 1 reply; 3+ messages in thread
From: Robin H. Johnson @ 2018-02-01  5:31 UTC (permalink / raw
  To: gentoo-dev

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.

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?

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] Gentoo Overlay Git: Feature Branches
  2018-02-01  5:31 ` Robin H. Johnson
@ 2018-02-01  5:38   ` Georgy Yakovlev
  0 siblings, 0 replies; 3+ messages in thread
From: Georgy Yakovlev @ 2018-02-01  5:38 UTC (permalink / raw
  To: gentoo-dev

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-01  5:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01  2:32 [gentoo-dev] Gentoo Overlay Git: Feature Branches Lucas Ramage
2018-02-01  5:31 ` Robin H. Johnson
2018-02-01  5:38   ` Georgy Yakovlev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox