Commit Graph
3 Commits
Author SHA1 Message Date
Fintan Halpenny daffac4101 git-ref-format: rename namespace functions
The namespace functions can read confusingly:
* `namespaced` - the naming sounds like it is namespacing the input,
when in fact it is ensuring that the input is namespaced.
* `add_namespace` - can be read as adding the namespace to the end of
a ref, when in fact it is placed at the beginning.

Change the naming, respectively, to:
* `to_namespaced` - this uses the conversion naming convention
detailed here[0].
* `with_namespace` - reads as plainly namespacing the ref string.

[0]: https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2022-10-13 09:21:53 +01:00
Fintan Halpenny 339d7fc097 git-ref-format: qualified macro
Add a `qualified!` macro to the set of git-ref-format macros. This
allows the construction of a `refs/<cat>/<name>` reference from a
string literal.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2022-10-12 17:00:05 +01:00
Fintan Halpenny 70b571b67b radicle-git init
Port over all git relevant parts of the radicle-link repository[0].
The packages that are kept are:
* git-ext
* git-ref-format
* git-trailers
* link-git
* macros
* std-ext
* test -- only the portions that test the above

The development and testing scripts are also added for local and CI
testing.

[0]: https://github.com/radicle-dev/radicle-link/
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2022-09-08 12:07:51 +01:00