upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/git_remote_helper.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-08-08 14:42:35 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-08-08 14:42:35 +0100
commitf6371595b514a962078bd58254df5cda939706bf (patch)
treec9271f7fa016b146891f14afca77673970da5691 /src/git_remote_helper.rs
parentbbb30614245bc9b34ebd3f6df7b94955a31c7310 (diff)
fix(remote) `push` proposals patch order
so that ancestors come first
Diffstat (limited to 'src/git_remote_helper.rs')
-rw-r--r--src/git_remote_helper.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs
index fabd7b9..f679f20 100644
--- a/src/git_remote_helper.rs
+++ b/src/git_remote_helper.rs
@@ -664,7 +664,7 @@ async fn push(
664 let tip_of_proposal_commit = 664 let tip_of_proposal_commit =
665 git_repo.get_commit_or_tip_of_reference(&tip_of_proposal)?; 665 git_repo.get_commit_or_tip_of_reference(&tip_of_proposal)?;
666 let tip_of_pushed_branch = git_repo.get_commit_or_tip_of_reference(from)?; 666 let tip_of_pushed_branch = git_repo.get_commit_or_tip_of_reference(from)?;
667 let (ahead, behind) = git_repo 667 let (mut ahead, behind) = git_repo
668 .get_commits_ahead_behind(&tip_of_proposal_commit, &tip_of_pushed_branch)?; 668 .get_commits_ahead_behind(&tip_of_proposal_commit, &tip_of_pushed_branch)?;
669 if behind.is_empty() { 669 if behind.is_empty() {
670 if [repo_ref.maintainers.clone(), vec![proposal.author()]] 670 if [repo_ref.maintainers.clone(), vec![proposal.author()]]
@@ -677,6 +677,7 @@ async fn push(
677 get_event_root(tip_patch)? 677 get_event_root(tip_patch)?
678 }; 678 };
679 let mut parent_patch = tip_patch.clone(); 679 let mut parent_patch = tip_patch.clone();
680 ahead.reverse();
680 for (i, commit) in ahead.iter().enumerate() { 681 for (i, commit) in ahead.iter().enumerate() {
681 let new_patch = generate_patch_event( 682 let new_patch = generate_patch_event(
682 git_repo, 683 git_repo,