Commit Graph
37 Commits
Author SHA1 Message Date
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 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 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 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 1872717660 surf: publish v0.15.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-09-01 08:57:06 +01:00
Fintan Halpenny 982f71638b surf: release v0.14.1
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-08-16 10:09:39 +01:00
Fintan Halpenny faec1844b5 surf: update Cargo metadata
The homepage and repository fields were out of date. Update them to
the new radicle-git link.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-07-27 16:44:15 +01:00
Fintan Halpenny e6a20735c6 surf: release v0.14.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-06-22 12:49:54 +01:00
Fintan Halpenny 045a2d6534 publish: radicle-git-ext, git-ref-format-*, radicle-surf
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-06-02 13:40:33 +01:00
Fintan Halpenny 9bc0d118a0 publish: radicle-git-ext-0.5.1, radicle-surf-0.12.1
Add features to radicle-git-ext to access the bstr and
percent-encoding features of git-ref-format.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-31 13:57:36 +01:00
Fintan Halpenny 2545a01fec surf: release v0.12.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-26 20:45:51 +01:00
Fintan Halpenny 5513ba4f41 publish: radicle-surf 0.11.0
Publish radicle-surf, updating radicle-git-ext and allowing a minicbor
feature flag.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-10 10:37:13 +01:00
Fintan Halpenny 4c9e958dd7 publish: radicle-git-ext, git-ref-format, radicle-surf
git-ref-format-core included the required changes and was missed via
the last publish. Publish the set of crates bumped up to a new semver.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-05 10:37:50 +01:00
Fintan Halpenny fc6a4fcac5 publish: git-ref-format, radicle-git-ext, radicle-surf
Publish git-ref-format, radicle-git-ext, and radicle-surf with several
additions and bug fixes.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-05 10:11:13 +01:00
Fintan Halpenny 15014923c7 publish: git-ref-format-{core, macro}, radicle-git-ext, radicle-surf
In an attempt to publish radicle-surf, it could not compile due to
git-ref-format supposedly missing.

This is an attempt to publish the git-ref-format family and
radicle-git-ext again in order to try publish radicle-surf.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-03 20:45:06 +01:00
Fintan Halpenny 9d44dacdae publish: radicle-git-ext and radicle-surf
Publish new versions:
* radicle-git-ext 0.4.0
* radicle-surf 0.10.0

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-03 20:06:40 +01:00
Fintan Halpenny a8ce42766f meta: update to git2-0.17.0
Updates all crates to the latest git2 version, 0.17.0.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-14 17:07:35 +01:00
Fintan Halpenny e81ea9b558 git-ext: update to version 0.3.0
Update radicle-git-ext to version 0.3.0 for publishing to crates.io.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-27 11:01:21 +01:00
Han Xu 59515f68e8 move git-ref-format to under radicle-git-ext
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-21 20:19:30 -08:00
Fintan Halpenny e0358441b9 Merge remote-tracking branch 'origin/git-ref-format-bump-version'
* origin/git-ref-format-bump-version:
  git-ref-format: bump up version and add CHANGELOG.md

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-08 16:26:33 +00:00
Han Xu ac9cfc1cc6 git-ref-format: bump up version and add CHANGELOG.md
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-07 04:11:16 -08:00
Han Xu ec3374c3c9 add CHANGELOG.md
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-06 21:20:04 -08:00
Fintan Halpenny 7036923712 nix: update to rust-1.67
Rust 1.67 was announced[0].

Update the nix sources to be on par with the latest rustc version.

This required fixes to clippy warnings for using variable
interpolation for format strings.

There was also an advisory error related to libgit2-sys[1], which is
transitively depended on via git2. The fix is included in the 0.16.1
version of git2.

[0]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html
[1]: https://rustsec.org/advisories/RUSTSEC-2023-0003

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-01-30 11:00:22 +00:00
Fintan Halpenny 59d2508392 radicle-surf: remove syntax highlighting
Remove the syntax feature flag and any of the syntax highlighting
logic. This is not required any more from the clients implementation
and so we minimise this codebase in favour of any downstream dependent
to define how they highlight the blob's content.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-30 13:22:44 +00:00
Fintan Halpenny 3284149bd6 radicle-surf: rename serialize to serde
Instead of creating a named feature flag, opt for using the `serde`
package name as the feature flag name. This makes it more clear that
the feature is only enabling serde serialization and nothing else.

This patch also cleans up the testing flags by removing the serialize
flag for testing, as this should just always be tested, and also adds
the syntax flag for future testing.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-30 13:22:44 +00:00
Fintan Halpenny b4d3bf69cf radicle-surf: refactor source objects
Refactor the source data types to reuse existing logic and update to
the latest protocol.

The `Blob` and `Tree` data types are updated to be backed by `File`
and `Directory` respectively. This allows the construction of them to
be much simpler and reuse any existing logic on those types. This also
lead to the removal of `ObjectType` and `Info`.

The `Revision` type was removed in favour of using the `Revision`
trait.

The `Revisions` type was renamed to `View`, while also renaming the
`revision` module to `view`. A `View` is a simple encoding of what a
peer's "view" would look like, i.e. what references do they have. This
also required the introduction of getting free-form categories in the
reference db, i.e. `refs/<category>`, and so a `Categories` iterator
was also introduced.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-30 13:22:44 +00:00
Fintan Halpenny a549eccd08 radicle-surf: refactor directory
This patch applies some refactoring to the directory module. It
applies some renaming and adds some useful methods to the `File` and
`Directory` types.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-24 12:01:39 +00:00
Fintan Halpenny 9c80fb06a7 meta: clean up cargo dependencies
The aim of this patch is to solve some of the `cargo deny`
warnings. This required updating some dependencies. Some dependencies
of radicle-surf were not used, so they were outright removed.

The last_commit benchmark in radicle-surf is irrelevant as we use more
efficient methods for getting repository histories, so it has been
removed.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-24 11:26:32 +00:00
Fintan Halpenny 9b5ea4352f radicle-surf: rework to use git-ref-format
The aim of this commit is to better represent the reference names
using git-ref-format.

The first places to change were the Branch and Tag types. For Branch,
the previous types were simply wrappers around the names. They stay
this way, using RefString instead. For Tag, the `name` field is
replaced with RefString.
Note: The parsing logic becomes easier here by utilising the
Namespaced and Qualified types.

The consequences of these changes meant that areas that used
BranchName or TagName are changed to use RefString.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-11-18 10:18:11 +00:00
Fintan Halpenny 55668e6e0f Merge remote-tracking branch 'han/ref-format'
* han/ref-format:
  Remove Ref, RefGlob and Rev, add Glob that uses git-ref-format.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2022-11-09 11:20:57 +00:00
Han Xu 35b9598a29 Remove Ref, RefGlob and Rev, add Glob that uses git-ref-format.
- Refactored branches(), tags(), namespaces().
- Added filtering for revision_branches().

Signed-off-by: Han Xu <keepsimple@gmail.com>
2022-11-07 14:33:16 -08:00
Han Xu 0c941740c8 radicle-surf: test structure compliance.
The test structure should be that all tests are gathered under a 't'
sub-crate, followed by the 'test' crate depending on this new crate.
2022-09-29 09:37:54 -07:00
Fintan Halpenny 38c84a5958 meta: update to git2-0.15.0
The git2 crate has moved forward and is now at version 0.15.0 while the
dependencies in radicle-git were using 0.13.

Bump the dependencies to version 0.15.0.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2022-09-22 08:42:30 +01:00
Han Xu eb1653cdb7 merge radicle-source into radicle-surf
Initially, radicle-source was envisioned to be another layer on top
of radicle-surf, however, it ended up duplicating a lot of concepts.

We consolidate them by merging radicle-source into radicle-surf.
This meant removing modules branch.rs, tag.rs, oid.rs and error.rs.
2022-09-21 17:07:06 -07:00
Sebastian Martinez ff97333d0a Serialize instances for Commit BranchType BranchName and Branch
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2022-09-19 15:40:23 +02:00
Han Xu 58d69ebf7f copy radicle-surf and radicle-source into this repo.
Signed-off-by: Han Xu <keepsimple@gmail.com>
2022-09-16 22:17:49 -07:00