upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/git_remote_nostr/list.rs3
-rw-r--r--src/lib/repo_state.rs2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs
index ea29531..c27e4d2 100644
--- a/src/bin/git_remote_nostr/list.rs
+++ b/src/bin/git_remote_nostr/list.rs
@@ -299,7 +299,8 @@ fn list_from_remote_url(
299 head.name().to_string(), 299 head.name().to_string(),
300 format!("ref: {symbolic_reference}"), 300 format!("ref: {symbolic_reference}"),
301 ); 301 );
302 } else { 302 // ignore dereferenced tags
303 } else if !head.name().to_string().ends_with("^{}") {
303 state.insert(head.name().to_string(), head.oid().to_string()); 304 state.insert(head.name().to_string(), head.oid().to_string());
304 } 305 }
305 } 306 }
diff --git a/src/lib/repo_state.rs b/src/lib/repo_state.rs
index ebd8e7f..f061158 100644
--- a/src/lib/repo_state.rs
+++ b/src/lib/repo_state.rs
@@ -19,6 +19,8 @@ impl RepoState {
19 if ["refs/heads/", "refs/tags", "HEAD"] 19 if ["refs/heads/", "refs/tags", "HEAD"]
20 .iter() 20 .iter()
21 .any(|s| name.starts_with(*s)) 21 .any(|s| name.starts_with(*s))
22 // dont include dereferenced tags
23 && !name.ends_with("^{}")
22 { 24 {
23 if let Some(value) = tag.as_slice().get(1) { 25 if let Some(value) = tag.as_slice().get(1) {
24 if Oid::from_str(value).is_ok() || value.contains("ref: refs/") { 26 if Oid::from_str(value).is_ok() || value.contains("ref: refs/") {