MCPcopy Index your code
hub / github.com/emwalker/digraph / ensure_topic

Method ensure_topic

backend/src/git/topic.rs:777–791  ·  view source on GitHub ↗
(&self, mutation: &Mutation, topic_id: &ExternalId)

Source from the content-addressed store, hash-verified

775 }
776
777 fn ensure_topic(&self, mutation: &Mutation, topic_id: &ExternalId) -> RepoTopic {
778 match mutation.fetch_topic(self.repo_id, topic_id) {
779 Some(topic) => topic,
780
781 // If the topic is being upserted into another repo, we create a reference to the
782 // parent topic in the current repo
783 None => {
784 log::info!(
785 "no topic found in selected repo, creating reference: {}",
786 topic_id
787 );
788 RepoTopic::make_reference(topic_id.to_owned())
789 }
790 }
791 }
792}
793
794pub struct UpsertTopicTimerange {

Callers 2

callMethod · 0.80
update_repo_topicMethod · 0.80

Calls 1

fetch_topicMethod · 0.45

Tested by

no test coverage detected