upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/git_remote_nostr')
-rw-r--r--src/bin/git_remote_nostr/push.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs
index 4e0d760..9cf6dff 100644
--- a/src/bin/git_remote_nostr/push.rs
+++ b/src/bin/git_remote_nostr/push.rs
@@ -794,17 +794,19 @@ fn generate_updated_state(
794 format!("{to}{}", "^{}"), 794 format!("{to}{}", "^{}"),
795 git_repo 795 git_repo
796 .get_commit_or_tip_of_reference(from) 796 .get_commit_or_tip_of_reference(from)
797 .unwrap() 797 .context(format!(
798 "cannot find commit from ref {from} to push to {to}"
799 ))?
798 .to_string(), 800 .to_string(),
799 ); 801 );
800 new_state.insert( 802 new_state.insert(
801 to.to_string(), 803 to.to_string(),
802 git_repo 804 git_repo
803 .git_repo 805 .git_repo
804 .find_reference(to) 806 .find_reference(from)
805 .unwrap() 807 .context(format!("cannot find ref {from} to push to {to}"))?
806 .peel(git2::ObjectType::Tag) 808 .peel(git2::ObjectType::Tag)
807 .unwrap() 809 .context(format!("cannot find tag id {from} to push to {to}"))?
808 .id() 810 .id()
809 .to_string(), 811 .to_string(),
810 ); 812 );
@@ -814,7 +816,9 @@ fn generate_updated_state(
814 to.to_string(), 816 to.to_string(),
815 git_repo 817 git_repo
816 .get_commit_or_tip_of_reference(from) 818 .get_commit_or_tip_of_reference(from)
817 .unwrap() 819 .context(format!(
820 "cannot find commit from ref {from} to push to {to}"
821 ))?
818 .to_string(), 822 .to_string(),
819 ); 823 );
820 } 824 }