upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/git_remote_nostr/list.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-23 10:46:26 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-23 13:36:53 +0100
commit2cdbb8c7ac6c98af6e36c4458c08bef2299794e1 (patch)
treefcf7c56d2f5eda0776643f8a52090965f1de06a8 /tests/git_remote_nostr/list.rs
parent51358320c50afece31fc25945a09e3d7aac8f39c (diff)
fix(remote): add resilience to `prs`
make poorly formatted patches fail silently. we stop trusting that the `commit` tag in the latest patch can be produced by apply the patches. to achieve this we must recreate the commit during the list command, which require fetching the parent oids. support patches without optional `commit` and `parent-commit` tags.
Diffstat (limited to 'tests/git_remote_nostr/list.rs')
-rw-r--r--tests/git_remote_nostr/list.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/git_remote_nostr/list.rs b/tests/git_remote_nostr/list.rs
index d173cc7..37cff30 100644
--- a/tests/git_remote_nostr/list.rs
+++ b/tests/git_remote_nostr/list.rs
@@ -52,6 +52,10 @@ mod without_state_announcement {
52 assert_eq!( 52 assert_eq!(
53 res.split("\r\n") 53 res.split("\r\n")
54 .map(|e| e.to_string()) 54 .map(|e| e.to_string())
55 .filter(|s| !s.contains("remote: ")
56 && !s.contains("Receiving objects")
57 && !s.contains("Resolving deltas")
58 && !s.contains("fetching /"))
55 .collect::<HashSet<String>>(), 59 .collect::<HashSet<String>>(),
56 HashSet::from([ 60 HashSet::from([
57 "@refs/heads/main HEAD".to_string(), 61 "@refs/heads/main HEAD".to_string(),
@@ -220,6 +224,10 @@ mod with_state_announcement {
220 assert_eq!( 224 assert_eq!(
221 res.split("\r\n") 225 res.split("\r\n")
222 .map(|e| e.to_string()) 226 .map(|e| e.to_string())
227 .filter(|s| !s.contains("remote: ")
228 && !s.contains("Receiving objects")
229 && !s.contains("Resolving deltas")
230 && !s.contains("fetching /"))
223 .collect::<HashSet<String>>(), 231 .collect::<HashSet<String>>(),
224 HashSet::from([ 232 HashSet::from([
225 "@refs/heads/main HEAD".to_string(), 233 "@refs/heads/main HEAD".to_string(),