From 237ab4ebcdc5bf58f98958db5375d56baf8046a0 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 26 Feb 2026 11:35:00 +0000 Subject: fix: correct refspec source in ngit sync to strip refs/heads/ prefix When syncing, the nostr state stores refs with full names like refs/heads/master and refs/tags/v1.0.0. Git tracking refs strip the refs/heads/ prefix, so the tracking ref lives at refs/remotes/origin/master not refs/remotes/origin/refs/heads/master. The sync code was interpolating the full nostr_ref_name into the source side of the refspec, producing the invalid double-prefixed path. Strip refs/heads/ or refs/tags/ before constructing the tracking ref segment, consistent with how git_remote_nostr/push.rs already handles this. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d58e1d..e6a7721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - git server push option passthrough, enabling `-o secret-scanning.skip` for grasp servers +### Fixed + +- `ngit sync` using wrong refspec source (`refs/remotes/origin/refs/heads/master` instead of `refs/remotes/origin/master`), causing sync to fail with "src refspec does not match any existing object" + ## [2.2.1] - 2026-02-25 ### Fixed -- cgit v1.2.3