upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-08-06 16:32:13 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-08-06 16:32:13 +0100
commitaa24c9057c055247ddd6c780ad5b2874d476b99c (patch)
tree9c44c080699639e3486b940570a3a4036ee28a02
parent3300a1e4a463dcc007292ff3c3e4cf7cc2252e71 (diff)
fix(remote): `list` correct proposal refs
as the `refs/heads/` prefix wasn't present
-rw-r--r--src/git_remote_helper.rs2
-rw-r--r--tests/git_remote_helper.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs
index d4aee42..d7363cf 100644
--- a/src/git_remote_helper.rs
+++ b/src/git_remote_helper.rs
@@ -292,7 +292,7 @@ async fn list(
292 // we will need to check whether the commit id exists in the repo or apply the 292 // we will need to check whether the commit id exists in the repo or apply the
293 // proposal and each patch to check 293 // proposal and each patch to check
294 if let Ok(commit_id) = get_commit_id_from_patch(patch) { 294 if let Ok(commit_id) = get_commit_id_from_patch(patch) {
295 state.insert(branch_name, commit_id); 295 state.insert(format!("refs/heads/{branch_name}"), commit_id);
296 } 296 }
297 } 297 }
298 } 298 }
diff --git a/tests/git_remote_helper.rs b/tests/git_remote_helper.rs
index f86cb7a..bfe0e25 100644
--- a/tests/git_remote_helper.rs
+++ b/tests/git_remote_helper.rs
@@ -520,7 +520,7 @@ mod list {
520 FEATURE_BRANCH_NAME_3, 520 FEATURE_BRANCH_NAME_3,
521 ] { 521 ] {
522 pr_refs.push(format!( 522 pr_refs.push(format!(
523 "{} {}", 523 "{} refs/heads/{}",
524 proposal_creation_repo.get_tip_of_local_branch(name)?, 524 proposal_creation_repo.get_tip_of_local_branch(name)?,
525 get_proposal_branch_name_from_events(&r55.events, name)?, 525 get_proposal_branch_name_from_events(&r55.events, name)?,
526 )); 526 ));