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
2023-03-27 11:01:21 +01:00
2024-06-28 12:08:44 +01:00
2024-03-13 14:32:14 +00:00
2025-05-23 10:23:47 +01:00
2024-03-06 15:59:57 +00:00
2025-02-20 08:42:04 +00:00
2024-08-29 09:54:11 +01:00
2022-09-15 16:35:47 +01:00
2022-09-15 16:35:47 +01:00
2022-09-15 16:35:47 +01:00
2025-02-10 14:11:28 +00:00
2025-02-10 14:11:28 +00:00
2025-02-10 14:11:28 +00:00
2022-09-15 16:35:47 +01:00
2022-09-15 16:35:47 +01:00

radicle-git

The home for all Git utilities related to Radicle. While the majority of the utilities will attempt to be general, there may be more opinionated parts that are geared towards Radicle.

Motivation

The git2 and gitoxide libraries provide low-level APIs for interacting with git repositories and the git protocol. This family of crates attempts to provide a higher-level wrapper around those to provide a more useful API for the Radicle protocol and UI clients building on top of the protocol.

Overview

The repository is defined as a series of crates:

  • git-ext -- provides higher-level types over common types found in git2.
  • git-ref-format -- provides a higher-level API for constructing git. reference paths. Prefer this over git-ext's RefLike and RefspecPattern.
  • git-trailers -- provides a way to parse and construct git trailers.
  • git-types -- provides higher-level types, e.g. Namespace, Reference, Remote, etc.
  • link-git -- provides a higher-level API for git's refdb, odb, and the git protocol.
  • macros -- provides macros for the git-ext references types.
  • std-ext -- provides some utilities extending the standard library.
  • test -- a shim crate that refers depends on all other, individual test crates.

Tests

Please refer to test/README.md for understanding how our tests are organised.

Contribute

Please read CONTRIBUTING.md for a guide on contributing to this repository.

Credits

Thanks to the previous maintainers of the radicle-link repository, Kim, Alex, and Fintan, for providing the foundation to work upon -- as well as the contributors.

S
Description
Git libraries for Radicle
Readme
1.6 MiB
Languages
Rust 97.3%
Nix 2.1%
Shell 0.6%