diff options
Diffstat (limited to 'src/bin/git_remote_nostr')
| -rw-r--r-- | src/bin/git_remote_nostr/list.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs index df98c12..3159e0a 100644 --- a/src/bin/git_remote_nostr/list.rs +++ b/src/bin/git_remote_nostr/list.rs | |||
| @@ -166,7 +166,18 @@ async fn get_open_and_draft_proposals_state( | |||
| 166 | { | 166 | { |
| 167 | match tag_value(pr_or_pr_update, "c") { | 167 | match tag_value(pr_or_pr_update, "c") { |
| 168 | Ok(tip) => { | 168 | Ok(tip) => { |
| 169 | state.insert(format!("refs/heads/{branch_name}"), tip); | 169 | // only list Pull Requests as refs/heads/pr/* if data is on a repo git |
| 170 | // server otherwise the standard `git clone | ||
| 171 | // nostr://` cmd will fail as it assumes all /refs/heads returned by | ||
| 172 | // list are accessable | ||
| 173 | let tip_oid_is_on_a_repo_git_server = | ||
| 174 | remote_states.iter().any(|(_url, (state, _is_grasp))| { | ||
| 175 | state.iter().any(|(_, oid)| tip == *oid) | ||
| 176 | }); | ||
| 177 | |||
| 178 | if tip_oid_is_on_a_repo_git_server { | ||
| 179 | state.insert(format!("refs/heads/{branch_name}"), tip); | ||
| 180 | } | ||
| 170 | } | 181 | } |
| 171 | Err(_) => { | 182 | Err(_) => { |
| 172 | let _ = term.write_line( | 183 | let _ = term.write_line( |