Commit Graph
287 Commits
Author SHA1 Message Date
Fintan Halpenny b570fa1435 Re-License to "MIT OR Aapache-2.0"
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
2025-11-14 12:52:22 +01:00
Fintan Halpenny 7d68eaff7b Remove archived crates/repositories
These are a maintenance burden at this stage, so they are being removed.
2025-11-14 12:52:01 +01:00
Fintan Halpenny 6aa5d631d3 meta: CHANGELOG entries for release 2025-09-11 09:07:17 +01:00
Fintan Halpenny 6422fd580b Crates Release
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`
2025-09-11 09:05:28 +01:00
Fintan Halpenny 9bed9a399d meta: update flate2 and tracing-subscriber
These two crates had advisory warnings due to dependencies, so their
versions are bumped.
2025-09-11 09:05:28 +01:00
Fintan Halpenny a25477078f meta: remove package version
This field is not being read or used
2025-09-11 09:05:28 +01:00
Fintan Halpenny 3e3c5e0f0e git-storage: remove crate
This crate is not being published and is not used anywhere, so it is
being removed from the set of crates.
2025-09-11 09:05:28 +01:00
Fintan Halpenny b3af979faa nix: add cargo-semver-checks 2025-09-11 09:05:20 +01:00
Lorenz Leutgeb 24237552ec ref-format: Relax first component of namespaced
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.
2025-09-09 13:17:29 +02:00
Fintan Halpenny 786248add3 surf: release 0.24.0 2025-07-15 17:19:35 +01:00
Fintan Halpenny 30d8275e5f surf: avoid last commit computation on Tree
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.
2025-07-15 17:19:35 +01:00
ulic-youthlic 603a18820f add .direnv to .gitignore 2025-05-23 10:23:47 +01:00
Fintan Halpenny 40a87a2d6b chore: bump release numbers
- `radicle-std-ext-0.1.1`
- `git-ref-format-0.4.0`
- `git-ref-format-core-0.4.0`
- `git-ref-format-macro-0.4.0`
- `radicle-git-ext-0.9.0`
- `radicle-surf-0.23.0`
2025-02-20 08:42:04 +00:00
Fintan Halpenny c265df5b8e chore: update Cargo metadata
Update `edition` fields to 2021.

Add `homepage` and `repository` fields to all the sub-crates.
2025-02-20 08:42:04 +00:00
Fintan Halpenny 527fddfd4d chore: update rust toolchain 1.84
Fixed clippy warnings for lifetime elision and preferring `Display`
implementations over `ToString`.
2025-02-10 14:11:28 +00:00
Fintan Halpenny 41e3f30ffc chore: update deny and audit
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
2025-02-10 14:11:28 +00:00
Fintan Halpenny ecb3969a88 nix: update to release 24.11 2025-02-10 14:11:28 +00:00
Fintan Halpenny d78b63956a surf: clippy base64 cleanup
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
2024-09-02 13:25:11 +01:00
Fintan Halpenny d1cc777cfb ref-format: improve Qualified/NamespacedPattern API
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
2024-09-02 13:16:38 +01:00
Fintan Halpenny 9d3af5fa43 meta: update dependency versions
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-08-29 09:54:11 +01:00
Fintan Halpenny 556663854e release: radicle-surf-0.22.0, radicle-git-ext-0.8.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-07-18 09:34:06 +01:00
Fintan Halpenny 224ad08366 Update to git2-0.19
Update the `git2` dependencies to `0.19`, which also allows the uncommenting of
two tests in the `diff` test suite -- as reported by [issue #149][#149].

[#149]: https://github.com/radicle-dev/radicle-git/issues/149

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-06-28 12:08:44 +01:00
Sebastian Martinez 0dd1383ed6 surf: Fix comment typo 2024-06-04 11:24:11 +02:00
Alexis Sellier 19353fc700 git: Split parsing of Time from Author
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
2024-04-25 15:28:16 +01:00
Sebastian Martinez 1525ef65f1 git: Rename FileDiff tag from state to status
To be more consistent in the use between state and status on
radicle-interface.
2024-04-25 07:41:47 +02:00
Sebastian Martinez d71b65ab62 git: Update serialization for copied files
Use the same way of serialization of moved files for copied files
2024-04-25 07:41:47 +02:00
Fintan Halpenny 2e7f12b11f surf: release 0.21.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-18 16:09:42 +01:00
Sebastian Martinez ea76596fae surf: Improve diff binary detection
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
2024-04-18 16:03:46 +01:00
Fintan Halpenny 15255f2278 surf: release v0.20.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-17 16:37:29 +01:00
Fintan Halpenny 331dbe7e2e scripts: remove +nightly from fmt
The formatting no longer needs nightly and only uses stable features.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-04-17 16:18:52 +01:00
Sebastian Martinez dd6bb6fc58 surf: Move FileDiff and Diff serialization to container attributes
To keep the sorting of diffs that is provided by git we should change
the way we serialize them and avoid putting them into separate
modification specific properties.
2024-04-17 11:15:04 +02:00
Fintan Halpenny a37a40ee5e nix: add Nix flake
Add the Nix flake machinery for developing using Nix tooling.

This requires that the following are added:
- Cargo.lock
- rust-toolchain

To ensure that versions are pinned.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-13 14:32:14 +00:00
Fintan Halpenny b4ca7f31db test: improve commit and submodule testing
Two of the tests in radicle-git-ext and radicle-surf relied on using
the Git repository itself. This can end up being an issue when
sandboxing is involved.

This improves the situation by being able to generate commit data to
add to a temporary repository.

It also adds a helper for creating a local, temporary submodule for
testing the submodule interactions in the radicle-surf API.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-13 14:22:10 +00:00
Fintan Halpenny f4a958010c fmt: remove .rustfmt.toml
The formatting configuration is not worth the maintenance of a nightly
version. Remove it and allow the default formatting to be used
instead.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-13 14:11:36 +00:00
Fintan Halpenny 53c31312e0 nix: remove nix tooling in favour of future flake.nix
Removing the Nix tooling managed by niv in favour of a future
`flake.nix`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-13 13:56:19 +00:00
Fintan Halpenny ce858ec28f surf: release v0.19.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-07 14:51:27 +00:00
Fintan Halpenny 2391c25e95 surf: add submodule support
Git [submodules] are encoded as commits when walking a Git tree. To
allow the support of them in `radicle-surf`, the tree entry is checked
for this case. The entry will be treated such that it is has a name,
prefix, Oid, and the submodule's URL.

It's important to note that the Oid is not usable within the context
of the repository that is being browsed, since they are entirely
separate.

Instead, the URL should be used in conjunction with the Oid for
browsing purposes outside of `radicle-surf`. However, in a future
iteration it may be considered to be able to browse the local contents
of the submodule, if possible.

N.b. getting the submodule and its URL is not supported for a bare
repository, since it will complain about not having a working tree.

[submodules]: https://git-scm.com/book/en/v2/Git-Tools-Submodules

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-06 15:59:57 +00:00
Fintan Halpenny d5bf8e7f68 nix: update to rust-1.76
Run `niv update` to get the latest Rust toolchain.

This required applying some clippy improvements:

- Removing unnecessary re-export of Oid in `stats` module.
- Replace `get(0)` with `first`

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-05 09:59:12 +00:00
Fintan Halpenny e0b8789b47 git-ext, surf: update git2-0.18.1
Update git2 version to 0.18.1 and provide an updated release version
of radicle-git-ext 0.7.0 and radicle-surf 0.18.0.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-12-04 10:57:39 +00:00
Fintan Halpenny da05e409da surf: release 0.17.1
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-23 09:17:12 +00:00
Fintan Halpenny 71392e70a9 Merge remote-tracking branch 'origin/blob_ref'
* origin/blob_ref:
  surf: expose BlobRef

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-11-23 09:13:36 +00:00
Fintan Halpenny d3dd777d95 surf: expose BlobRef
The current `blob` function is limited to always associating a Blob
with a Commit.

Expose `BlobRef` through a `blob_ref` method, and add useful methods
and serialization to it.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-22 14:53:09 +00:00
Fintan Halpenny ab791d5f2c nix: update rust-1.74.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-22 14:11:52 +00:00
Fintan Halpenny f83c6d6856 surf: release v0.17.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-10-02 10:38:58 +01:00
Fintan Halpenny e7e059e233 Merge remote-tracking branch 'sebastinez/add-line-stats-per-file'
* sebastinez/add-line-stats-per-file:
  surf: Add `stats` property to each `DiffContent::Plain`

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-10-02 10:35:01 +01:00
Sebastian Martinez 097d01350d surf: Add stats property to each DiffContent::Plain
This allows us to get the additions and deletions for each file in a
diff.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-10-02 11:29:22 +02:00
Fintan Halpenny 3c8e3cd9d8 Merge remote-tracking branch 'sebastinez/add-small-disclaimer-on-diff-commits-fn'
* sebastinez/add-small-disclaimer-on-diff-commits-fn:
  surf: Add a small explainer on binary detection in diffs

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-10-02 10:19:16 +01:00
Sebastian Martinez c4590eca2d surf: Add a small explainer on binary detection in diffs
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-25 11:36:46 +02:00
Fintan Halpenny 25b6fcea2f surf: release v0.16.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-09-25 09:57:00 +01:00
Fintan Halpenny 80ac22a7e2 Merge remote-tracking branch 'sebastinez/add-current-oid-to-filediff'
* sebastinez/add-current-oid-to-filediff:
  surf: Add `DiffFile`s to `FileDiff` variants without a diff

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-09-21 15:07:56 +01:00