Add the ability to specify a git repository branch for gxpkg install #703

Closed
opened 2023-04-05 15:10:13 +00:00 by dboreham · 5 comments
dboreham commented 2023-04-05 15:10:13 +00:00 (Migrated from github.com)

This has probably already been considered, or is a known bad idea but in case not:

It would be useful to be be able to specify a non-default branch in the package repository for gxpkg install, e.g. with gxpkg install github.com/org/package/branch

The code here would need to execute git switch (or the older git checkout for compatibility with historical git releases):
https://github.com/vyzo/gerbil/blob/master/src/tools/gxpkg.ss#L226

I found that this would be useful when integrating a set of packages into a container build. One of the packages needed fixes applied to work in my scenario. I found it necessary to force the fixes onto the default/master branch in the package repository in order for gxpkg to pick them up. Better to have kept the fixes on a branch and pointed gxpkg at that branch.

This has probably already been considered, or is a known bad idea but in case not: It would be useful to be be able to specify a non-default branch in the package repository for `gxpkg install`, e.g. with `gxpkg install github.com/org/package/branch` The code here would need to execute `git switch` (or the older `git checkout` for compatibility with historical git releases): https://github.com/vyzo/gerbil/blob/master/src/tools/gxpkg.ss#L226 I found that this would be useful when integrating a set of packages into a container build. One of the packages needed fixes applied to work in my scenario. I found it necessary to force the fixes onto the default/master branch in the package repository in order for `gxpkg` to pick them up. Better to have kept the fixes on a branch and pointed `gxpkg` at that branch.
vyzo commented 2023-04-05 15:18:33 +00:00 (Migrated from github.com)

This sounds like a very desirable feature. Care for a patch?

This sounds like a very desirable feature. Care for a patch?
dboreham commented 2023-04-05 15:28:13 +00:00 (Migrated from github.com)

Is the gxpkg install github.com/org/package/branch syntax acceptable (where gxpkg install github.com/org/package means "use the default branch")?

Is the `gxpkg install github.com/org/package/branch` syntax acceptable (where `gxpkg install github.com/org/package` means "use the default branch")?
vyzo commented 2023-04-05 15:39:39 +00:00 (Migrated from github.com)

Maybe ...@thing is better?
We can also use tags, commits, and whatnot, not just branches.

Maybe `...@thing` is better? We can also use tags, commits, and whatnot, not just branches.
dboreham commented 2023-04-05 15:53:47 +00:00 (Migrated from github.com)

Oh yes good idea (not enough coffee yet this morning..)

Oh yes good idea (not enough coffee yet this morning..)
vyzo commented 2023-09-24 15:27:14 +00:00 (Migrated from github.com)

This is implemented in #916.

This is implemented in #916.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil#703
No description provided.