From 34d12345e8993e8df367d68a09fd041296c22559 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 1 Apr 2025 14:45:36 +0100 Subject: 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. --- src/bin/git_remote_nostr/push.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/git_remote_nostr/push.rs') 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( { let (ahead, behind) = git_repo.get_commits_ahead_behind(&from_tip, &remote_value_tip)?; - if behind.is_empty() { + if ahead.is_empty() { // can soft push refspecs_for_remote.push(refspec.clone()); } else { -- cgit v1.2.3