jgitver / jgitver/jgitver

Declarative support for `git namespaces`

Open
#89 1 comment 0 reactions 0 assignees View on GitHub
enhancement external
Dominant language
Java
Stars
189
Forks
42
PR merge metrics
No merged PRs in 30d

Description

The `git namespaces` feature is a tool that allows to drive scoped semantic versions in the same repository. For example, it is useful if you have experimental R&D versions, specialized client versions and a main line.

In a `namespace` and branches and tags are scoped with an automatic prefix. This means that if you declare `GIT_NAMESPACE=foo/bar` it feels like you are working on `origin/master` when actually you are on (and pushing to) `refs/namespaces/foo/refs/namespaces/bar/origin/master`. It is a bit like the `chroot` jail of a container.

The use of namespaces can be managed in `jgitver` using explicitly constructed pattern regexes for the `base` version. However, given that this is a nice declarative feature, it would be great if you could just tell `jgitver`: `jgitver.namespace="/experiments/parallelized-search"` and it would construct the search regex for this namespace.

Alternatively, this could be implemented at the level of `jgit`, but I have not found any API switches that perform the local scoping. If these exist, `jgitver` could simply set the namespace to `jgit` and continues as is.

`jgitver` would behave in the same way it always does, returning a simple version string.
Alternatively, `jgitver` could allow to map the `namespace` `meta` into the formatting of the version.

[How to use git namespaces](https://stackoverflow.com/questions/46854505/how-to-use-git-namespace-to-hide-branches)
[Git namespaces specification](https://git-scm.com/docs/gitnamespaces)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.