Run `cargo update -p proptest` to get the latest compatible version of
`proptest`.
This is to allow `cargo deny` to pass, since the previous version of
`proptest` brought in a vulnerable version of `rand`.
Fixes requesting a directory containing another directory with
[brackets] in its name
disable_pathspec_match(true) sets the GIT_DIFF_DISABLE_PATHSPEC_MATCH
flag on libgit2's diff options. Normally, pathspecs are matched using
fnmatch/glob pattern matching, where [ starts a character class, *
and ? are wildcards, and \ is the escape character. With this flag,
pathspecs are treated as literal strings with prefix matching for
directories. So src/[something] matches exactly src/[something] and
any files under it, rather than [something] being interpreted as a
glob character class matching a single character from the set s, o,
m, e, etc.
Removing escaped_name is OK because the old escaped_name doubled
backslashes(\ -> \\) specifically because pathspecs used glob/fnmatch
interpretation, where \ is the escape character. The doubling made
pathspec where \ is the escape character. The doubling made
pathspec treat \\ as "match a literal \". With
disable_pathspec_match(true), there's no glob interpretation at all,
so \ is already treated literally. The doubling is no longer needed
and would actually break things (pathspec would look for \\ instead
of \).
Regarding Windows, escaped_name has no impact on Windows behavior.
On Windows, \ is the path separator and cannot appear in filenames,
so escaped_name was effectively a no-op on Windows anyway. The
existing test for backslash filenames (special/faux\path) is
already gated with `#[cfg(not(windows))]` since such filenames
only exist on Unix. So removing escaped_name has no impact on Windows
behavior.
Bump the release of the crates to reflect the changes in the licensing.
Note that there are no change in the semantics of the libraries, as
checked via `cargo-semverchecks`.
With Rust 1.89.0, there was introduction to the mismatched lifetime
syntax lint[^1].
The suggestion is to use implicit lifetimes via `<'_>`, however, to
maintain the MSRV, the lifetimes are made explicit here by introducing
an (or using the existing) `'a` lifetime.
[^1]: https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#mismatched-lifetime-syntaxes-lint
Find and apply the MSRV, `rust-version = "1.78.0"` to the
`radicle-git` crates.
While applying this change, use the workspace values to clean up
repetition.
The main dependant of `radicle-git`, and its crates, is [`heartwood`].
It is licensed under MIT or Apache-2.0, which has been incompatible with the GPL-3.0 license.
Since the intellectual property of this code base is with the Better Internet Foundation, it was
decided to re-license code in this repository to make the upstream repository compatible.
- Remove the license headers (and instructions to add them)
- Add MIT and Apache-2.0 licenses
- Remove the GPL-3.0 license
- Change the license declarations in the `Cargo.toml` files
[`heartwood`]: https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Updating `radicle-git-ref-core` with update to `Namespaced` logic,
releasing the crate at version `0.5.0`.
This requires bumps to:
- `radicle-git-ref-macro-0.5.0`
- `radicle-git-ext-0.10.0`
- `radicle-surf-0.25.0`
The [manual page](man:gitnamespaces(7)) says:
> Git supports dividing the refs of a single repository into
> multiple namespaces, each of which has its own branches,
> tags, and `HEAD`.
Here, the mention of `HEAD` implies that requiring all
namespaced to start with
refs/namespaces/*/refs
is too strict, as there are legal namespaced refs such as
refs/namespaces/*/HEAD
which are not captured. Relax the corresponding condition, change
documentation and add a test to avoid regression.
The computation for getting the last commit that touched a `Tree` can be
expensive. This is avoided when constructing the `Tree` and is moved to a method
on the `Tree` and `Entry`, aptly named `last_commit`.
`Tree::commit` is kept, however, it now refers to the `Commit` that was used
when constructing the `Tree`. This is required to calculate the last commit. It
was also necessary to add the path of the `Tree`.
For adding `Entry::last_commit`, it was necessary to add the path of the
`Entry`. Incidentally, this can be useful for consumers, since just the `name`
would mean that they would have to manually construct the full path.
The deny tooling removed many of the keys that were in the `deny.toml`.
The auditing of the repository reported that `proc-macro-error` is
unmaintained ([RUSTSEC-2024-0370]). This is replaced with the fork, `proc-macro-error2`,
which is a drop-in replacement.
It also produced a vulnerability report ([RUSTSEC-2024-0421]) for the
`idna` crate, a transitive dependency of `url`. This is fixed by
pinning `url` to `>= 2.5.4`
[RUSTSEC-2024-0370]: https://rustsec.org/advisories/RUSTSEC-2024-0370
[RUSTSEC-2024-0421]: https://rustsec.org/advisories/RUSTSEC-2024-0421
It also pins `url` to be `>= 2.5.4`, since
The `base64` dependency is only required with the `serde`
feature. Move the import of `Engine` into the implentation sites.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Some elements of the `QaulifiedPattern` and `NamespacedPattern` API
were missing:
- `From` implementations
- `Display` implementations
- `Serialize` and `Deserialize` implementations
- `qualified_pattern` macro
This also requires bumping versions:
- `git-ref-format`: 0.3.1
- `git-ref-core`: 0.3.1
- `git-ref-format-macro`: 0.3.1
- `radicle-git-ext`: 0.8.1
- `radicle-surf`: 0.22.1
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This allows us to parse time values on their own.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Iterates over the git2::Diff entries to force libgit2 to do the binary detection.
Also toggles the `skip_binary_check` in the `DiffOptions`.
All this to workaround the libgit2 lazy flag setting[^0]
[^0]: https://github.com/libgit2/libgit2/issues/6637