upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/repo_state.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/repo_state.rs b/src/lib/repo_state.rs
index 345f05c..223fe56 100644
--- a/src/lib/repo_state.rs
+++ b/src/lib/repo_state.rs
@@ -22,11 +22,14 @@ impl RepoState {
22 let mut state = HashMap::new(); 22 let mut state = HashMap::new();
23 for tag in event.tags.iter() { 23 for tag in event.tags.iter() {
24 if let Some(name) = tag.as_slice().first() { 24 if let Some(name) = tag.as_slice().first() {
25 // include ^{} peeled refs for annotated tags: git requires
26 // both "<tag-oid> refs/tags/v1.0.0" and
27 // "<commit-oid> refs/tags/v1.0.0^{}" in the list output so
28 // it can resolve the tag to a commit. without the ^{} line
29 // git fetch --prune deletes the tag as unresolvable.
25 if ["refs/heads/", "refs/tags", "HEAD"] 30 if ["refs/heads/", "refs/tags", "HEAD"]
26 .iter() 31 .iter()
27 .any(|s| name.starts_with(*s)) 32 .any(|s| name.starts_with(*s))
28 // dont include dereferenced tags
29 && !name.ends_with("^{}")
30 { 33 {
31 if let Some(value) = tag.as_slice().get(1) { 34 if let Some(value) = tag.as_slice().get(1) {
32 if Oid::from_str(value).is_ok() || value.contains("ref: refs/") { 35 if Oid::from_str(value).is_ok() || value.contains("ref: refs/") {