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
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 ingit2.git-ref-format-- provides a higher-level API for constructing git. reference paths. Prefer this overgit-ext'sRefLikeandRefspecPattern.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'srefdb,odb, and the git protocol.macros-- provides macros for thegit-extreferences 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.