From c31a313ccf781e54fa15942bc882c1b113d3f590 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 24 Feb 2026 11:36:39 +0000 Subject: rename: fetch_repository_data -> fetch_repository_data_{excluding,with}_purgatory The old name was ambiguous - it wasn't clear whether purgatory was included or not. The two variants are now explicitly named: - fetch_repository_data_excluding_purgatory: DB only - fetch_repository_data_with_purgatory: DB + purgatory overlay SyncContext trait method also renamed to fetch_repository_data_with_purgatory to match the free function it delegates to. --- src/git/authorization.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/git/authorization.rs') diff --git a/src/git/authorization.rs b/src/git/authorization.rs index 0e9a8ba..bf49800 100644 --- a/src/git/authorization.rs +++ b/src/git/authorization.rs @@ -234,7 +234,7 @@ pub struct RepositoryData { /// /// This performs a single database query to fetch both announcement and state events, /// which is more efficient than separate queries. -pub async fn fetch_repository_data( +pub async fn fetch_repository_data_excluding_purgatory( database: &SharedDatabase, identifier: &str, ) -> Result { @@ -298,7 +298,7 @@ pub async fn fetch_repository_data_with_purgatory( identifier: &str, ) -> Result { // First, fetch from database - let mut repo_data = fetch_repository_data(database, identifier).await?; + let mut repo_data = fetch_repository_data_excluding_purgatory(database, identifier).await?; // Then, add announcements from purgatory let purgatory_announcements = purgatory.get_announcements_by_identifier(identifier); @@ -511,7 +511,7 @@ pub async fn get_authorization_from_db( identifier: &str, ) -> Result { // Fetch all repository data with a single query - let repo_data = fetch_repository_data(database, identifier).await?; + let repo_data = fetch_repository_data_excluding_purgatory(database, identifier).await?; if repo_data.announcements.is_empty() { return Ok(AuthorizationResult::denied( -- cgit v1.2.3