Skip to content

Commit

Permalink
fix: repo_ref 'not found' err suggest `ngit init'
Browse files Browse the repository at this point in the history
if the nostr remote was created by the maintainer before
`ngit init` was ran.

the error is more likely to occur when a user clones a repo using
the nostr remote whist the relay in the hint is down and the fallback
relays dont have the announcement. or if the user is offline when
they clone.
  • Loading branch information
DanConwayDev committed Dec 2, 2024
1 parent d482eb8 commit a6a1eeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ pub async fn get_repo_ref_from_cache(
let repo_ref = RepoRef::try_from((
repo_events
.first()
.context("no repo announcement event found at specified coordinates")?
.context("no repo announcement event found at specified coordinates. if you are the repository maintainer consider running `ngit init` to create one")?
.clone(),
repo_coordinates
.iter()
Expand Down

0 comments on commit a6a1eeb

Please sign in to comment.