don't
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(knot): update 'sh.tangled.repo.tree'

Update 'sh.tangled.repo.tree' to match the new definition of the
lexicon.

Signed-off-by: tjh <x@tjh.dev>

tjh 3e660ba3 bca09b02

+9 -19
+1 -1
crates/knot/README.md
··· 32 32 | ✅ | `sh.tangled.repo.log` | | 33 33 | ❌ | `sh.tangled.repo.setDefaultBranch` | | 34 34 | ✅ | `sh.tangled.repo.tags` | | 35 - | 🔶 | `sh.tangled.repo.tree` | cheats by not computing most recent commit 🚀. output does not match most recent knot server | 35 + | 🔶 | `sh.tangled.repo.tree` | cheats by not computing most recent commit 🚀 | 36 36 37 37 jetstream ingest: 38 38
+7 -11
crates/knot/src/model/convert.rs
··· 72 72 let name = value.filename().to_string(); 73 73 let mode = value.mode(); 74 74 75 - let is_file = mode.is_blob(); 76 - let is_subtree = mode.is_tree(); 77 - 75 + // Replicate the file mode values that go-git uses. 78 76 let mode_string = match mode.kind() { 79 - EntryKind::Tree => "drwxr-xr-x", 80 - EntryKind::Blob => "-rw-r--r--", 81 - EntryKind::BlobExecutable => "-rwxr-xr-x", 82 - EntryKind::Link => "----------", 83 - EntryKind::Commit => "----------", 77 + EntryKind::Tree => "0040000", 78 + EntryKind::Blob => "0100644", 79 + EntryKind::BlobExecutable => "0100755", 80 + EntryKind::Link => "0120000", 81 + EntryKind::Commit => "0160000", 84 82 }; 85 83 86 84 tree::TreeEntry { 87 - name, 88 85 mode: Cow::Borrowed(mode_string), 89 - is_file, 90 - is_subtree, 86 + name, 91 87 ..Default::default() 92 88 } 93 89 }
+1 -7
crates/lexicon/src/sh/tangled/repo/tree.rs
··· 58 58 pub mode: Cow<'static, str>, 59 59 60 60 /// File size in bytes 61 - pub size: usize, 62 - 63 - /// Whether this entry is a file 64 - pub is_file: bool, 65 - 66 - /// Whether this entry is a directory/subtree 67 - pub is_subtree: bool, 61 + pub size: i64, 68 62 69 63 pub last_commit: Option<LastCommit>, 70 64 }