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>2025-04-01 14:45:36 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-04-01 14:45:36 +0100
commit34d12345e8993e8df367d68a09fd041296c22559 (patch)
treedd0b4b86d675519232fb503586dd0ef503d94b24
parent948fe972eb2bddf187b79f2673a091b6331cfd90 (diff)
fix: allow soft push if not behind server
when nostr and the gitserver are out of sync an error was thrown when the git server was behind during soft push. It should only throw the error if its ahead of the tip to be pushed.
-rw-r--r--src/bin/git_remote_nostr/push.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs
index 15adc13..3e2282a 100644
--- a/src/bin/git_remote_nostr/push.rs
+++ b/src/bin/git_remote_nostr/push.rs
@@ -823,7 +823,7 @@ fn create_rejected_refspecs_and_remotes_refspecs(
823 { 823 {
824 let (ahead, behind) = 824 let (ahead, behind) =
825 git_repo.get_commits_ahead_behind(&from_tip, &remote_value_tip)?; 825 git_repo.get_commits_ahead_behind(&from_tip, &remote_value_tip)?;
826 if behind.is_empty() { 826 if ahead.is_empty() {
827 // can soft push 827 // can soft push
828 refspecs_for_remote.push(refspec.clone()); 828 refspecs_for_remote.push(refspec.clone());
829 } else { 829 } else {