upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib/git/mod.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-10-28 15:41:14 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-10-28 15:41:14 +0000
commitae87aedae9696f4c855ac3dc47e61faec9d07c15 (patch)
tree0309be588a4e3d3a510e7510300629cb2ec3a68a /src/lib/git/mod.rs
parent5979e13cdc65ea78894dbcab3acde11b246889a7 (diff)
chore: bump rust-nostr to patch near v0.36.0
bump all rust-nostr packages refactoring code based on breaking changes upgrading to patched version to address signer issue: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
Diffstat (limited to 'src/lib/git/mod.rs')
-rw-r--r--src/lib/git/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/git/mod.rs b/src/lib/git/mod.rs
index 875a336..5d14ce3 100644
--- a/src/lib/git/mod.rs
+++ b/src/lib/git/mod.rs
@@ -6,7 +6,10 @@ use std::{
6use anyhow::{bail, Context, Result}; 6use anyhow::{bail, Context, Result};
7use git2::{DiffOptions, Oid, Revwalk}; 7use git2::{DiffOptions, Oid, Revwalk};
8pub use identify_ahead_behind::identify_ahead_behind; 8pub use identify_ahead_behind::identify_ahead_behind;
9use nostr_sdk::hashes::{sha1::Hash as Sha1Hash, Hash}; 9use nostr_sdk::{
10 hashes::{sha1::Hash as Sha1Hash, Hash},
11 Tags,
12};
10 13
11use crate::git_events::{get_commit_id_from_patch, tag_value}; 14use crate::git_events::{get_commit_id_from_patch, tag_value};
12pub mod identify_ahead_behind; 15pub mod identify_ahead_behind;
@@ -836,10 +839,7 @@ fn git_sig_to_tag_vec(sig: &git2::Signature) -> Vec<String> {
836 ] 839 ]
837} 840}
838 841
839fn extract_sig_from_patch_tags<'a>( 842fn extract_sig_from_patch_tags<'a>(tags: &'a Tags, tag_name: &str) -> Result<git2::Signature<'a>> {
840 tags: &'a [nostr::Tag],
841 tag_name: &str,
842) -> Result<git2::Signature<'a>> {
843 let v = tags 843 let v = tags
844 .iter() 844 .iter()
845 .find(|t| t.as_slice()[0].eq(tag_name)) 845 .find(|t| t.as_slice()[0].eq(tag_name))
@@ -1092,10 +1092,10 @@ mod tests {
1092 fn test(time: git2::Time) -> Result<()> { 1092 fn test(time: git2::Time) -> Result<()> {
1093 assert_eq!( 1093 assert_eq!(
1094 extract_sig_from_patch_tags( 1094 extract_sig_from_patch_tags(
1095 &[nostr::Tag::custom( 1095 &Tags::new(vec![nostr::Tag::custom(
1096 nostr::TagKind::Custom("author".to_string().into()), 1096 nostr::TagKind::Custom("author".to_string().into()),
1097 prep(&time)?, 1097 prep(&time)?,
1098 )], 1098 )]),
1099 "author", 1099 "author",
1100 )? 1100 )?
1101 .to_string(), 1101 .to_string(),