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.
12 files changed
+193
-20
e0b8789b
→
2391c25e
added .gitmodules
@@ -0,0 +1,3 @@
| + | |
| + | |
| + | |
modified nix/sources.json
@@ -5,10 +5,10 @@
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -29,10 +29,10 @@
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-surf/Cargo.toml
@@ -26,6 +26,7 @@ doctest = false
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -52,6 +53,9 @@ version = "1"
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
added radicle-surf/data/git-platinum
@@ -0,0 +1 @@
| + | |
modified radicle-surf/examples/browsing.rs
@@ -55,6 +55,7 @@ fn print_directory(d: &Directory, repo: &Repository, indent_level: usize) {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle-surf/src/fs.rs
@@ -30,6 +30,7 @@ use std::{
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -52,6 +53,8 @@ pub mod error {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -59,6 +62,23 @@ pub mod error {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -198,6 +218,8 @@ pub enum Entry {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -211,19 +233,25 @@ impl Ord for Entry {
|
|
|
|
|
|
| + | |
|
|
| + | |
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -231,6 +259,7 @@ impl Entry {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -238,6 +267,7 @@ impl Entry {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -254,6 +284,7 @@ impl Entry {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -261,6 +292,12 @@ impl Entry {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -354,7 +391,7 @@ impl Directory {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -365,6 +402,10 @@ impl Directory {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -397,7 +438,7 @@ impl Directory {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -447,6 +488,7 @@ impl Directory {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -479,6 +521,7 @@ impl Directory {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -491,6 +534,93 @@ impl Revision for Directory {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-surf/src/repo.rs
@@ -440,6 +440,14 @@ impl Repository {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-surf/src/stats.rs
@@ -15,8 +15,6 @@
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
modified radicle-surf/src/tree.rs
@@ -26,6 +26,7 @@ use serde::{
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -108,10 +109,11 @@ impl Serialize for Tree {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -123,9 +125,14 @@ impl PartialOrd for EntryKind {
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -177,6 +184,7 @@ impl Entry {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -209,6 +217,10 @@ impl From<fs::Entry> for EntryKind {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -241,7 +253,7 @@ impl Serialize for Entry {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -249,8 +261,12 @@ impl Serialize for Entry {
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-surf/t/src/code_browsing.rs
@@ -31,6 +31,7 @@ fn iterate_root_dir_recursive() {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle-surf/t/src/diff.rs
@@ -129,7 +129,7 @@ fn test_diff() -> Result<(), Error> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-surf/t/src/submodule.rs
@@ -1,10 +1,21 @@
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|