Rust 1.66.0 was announced[0].
The code fixes were all for the clippy warning regarding needless
borrows.
The doc tool now parses for HTML, so any <placeholder> now needs to
be wrapped in backticks, i.e. `<placeholder>`.
[0]: https://blog.rust-lang.org/2022/12/15/Rust-1.66.0.html
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
When deserializing through `serde_json::from_value` the following
error would occur:
panicked at 'called Result::unwrap() on an Err value: Error("invalid
type: string "master", expected a borrowed string", line: 0, column:
0)'
To fix this it is necessary for the Deserialize implementations to
deserialize into an owned String and convert from there.
While attempting to test this the `Qualified` and `Namespaced`
implementations were not able to be used:
error: implementation of `serde::de::Deserialize` is not general enough
--> git-ref-format/t/src/properties/name.rs:86:9
|
86 | roundtrip::json_value(qualified);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `serde::de::Deserialize` is not general enough
|
= note: `Qualified<'_>` must implement `serde::de::Deserialize<'0>`, for any lifetime `'0`...
= note: ...but `Qualified<'_>` actually implements
`serde::de::Deserialize<'1>`, for some specific lifetime `'1`
The Deserialize for both of those types now return owned data by
returning a 'static lifetime instead.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Since this package is not intended for radicle-link anymore, the
feature flag and the literals are removed.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Add constants for well-known refspec component names.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Add DoubleEndedIterator implementations for the two Components
iterators.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
There was no mechanism for building refspec patterns that included
namespaces.
To get around this limitation, QualifiedPattern and NamespacedPattern
are added to the refspec module.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Improve Component::from_refstring by redefining it as
Component::from_refstr. This allows the use of `RefStr` or `RefString`
instead of just RefString.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
If the `qualified` macro was used, the compiler would complain that it
required an import of `Qualified`.
Fixed by importing Qualified within the unsafe block of the definition
of `qualified`.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Attempting to publish these crates results in errors that the
`description` field is missing and that the path dependencies do not
specify versions.
Add the `description` and `keywords` fields to `git-ref-format-core`,
`git-ref-format-macro` and `git-ref-format`.
Add the versions for the dependent crates.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
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>
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>
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>