Commit Graph
38 Commits
Author SHA1 Message Date
Alex Gleason 32892c8840 ngit: if there's no repo state event, clone from the best ngit server 2025-12-07 03:55:34 -06:00
DanConwayDev 5b8cb25675 Revert "Checkout branch with "force" so it updates the tree"
This reverts commit d13bc84232.

proceed with caution on this as i dont know what you were fixing
with this change
2025-11-28 11:34:19 -06:00
Alex Gleason 3050e93555 Fix return type of git.fetch method, ensure defaultBranch is returned 2025-11-23 10:14:21 -06:00
DanConwayDev 21e522cba7 Fix git fetch handle deteled refs 2025-11-13 16:11:39 -06:00
DanConwayDev a1f571b2d8 Fix git push publish state to repo relays
instead of hardcoded default
2025-11-12 13:40:06 -06:00
DanConwayDev d4eca86ec6 Fix retain prior state during git push to nostr remote
otherwise git push to a feature branch removes all other branches
including main and sets HEAD to feature branch.
2025-11-12 13:39:31 -06:00
DanConwayDev 44a208aed5 Fix don't unwrap symrefs in nostr remote
this was causing `refs/remotes/origin/HEAD` to be a commit id rather
than a symbolic reference like in the nostr state event
2025-11-12 13:38:51 -06:00
DanConwayDev d11a52992e Fix grasp server sync during automatic fetch
Ensure grasp servers stay synchronized with Nostr state events during
the periodic fetch (every 60 seconds). This prevents a critical UX issue
where the Nostr remote appears up-to-date but grasp servers have stale
refs, making the repository uncloneable.

This can occur when a state event is successfully published to Nostr
relays but an error prevents the corresponding git refs from being
pushed to grasp servers. By validating and syncing during fetch, we
ensure at least one grasp server has the correct refs that match the
Nostr state, maintaining repository accessibility.
2025-11-10 09:11:05 -06:00
DanConwayDev 50897e1164 fix: fetch Nostr remote refs into remote tracking refs instead of local refs
Previously, git fetch for Nostr remotes was directly updating local refs
(refs/heads/*), which incorrectly merged remote changes into the working
tree. Now properly fetches into remote tracking refs (refs/remotes/origin/*)
following standard Git behavior, allowing users to inspect and merge changes
manually.

When no Nostr state event is found, now only fetches from the first priority
clone URL instead of trying all URLs. This prevents potential sync issues
where different servers might have divergent histories, which would create
non-fast-forward conflicts that would revert on the next fetch from the
primary server.
2025-11-10 09:11:05 -06:00
DanConwayDev db001beeb5 Refactor to use parsed repo and state events
move abstract logic in git method extractRepositoryState to a
pure function parseRepositoryState with typed interface for
future reusability.

pass around parsed event instead of NostrEvent.
2025-11-10 09:11:05 -06:00
DanConwayDev 301b0d526b Refactor to abstract repo announcement parsing 2025-11-10 09:11:05 -06:00
DanConwayDev 20186ac94c git fetch recursively fetches state from grasp relays 2025-10-30 20:40:35 +00:00
DanConwayDev bd61f93174 Only wait 5s for provisioning if announcement was published 2025-10-30 11:52:49 +00:00
DanConwayDev 677103a1f1 Send announcement to GRASP servers that don't have it to ensure repo provisioning 2025-10-30 11:52:30 +00:00
DanConwayDev cc65cae4b2 Use GRASP servers found in Nostr repository announcement 2025-10-30 11:51:24 +00:00
DanConwayDev 60f42c4d40 Fix git push handling of --force for nostr remotes 2025-10-30 09:00:44 +00:00
DanConwayDev 926d1cbeba Fix git push for nostr - push to all ngit servers
not just the first
2025-10-30 07:53:32 +00:00
Alex Gleason d13bc84232 Checkout branch with "force" so it updates the tree 2025-10-29 15:10:20 -05:00
Alex Gleason ab91a56da6 Make Nostr git servers configurable 2025-10-14 20:53:32 -05:00
Alex Gleason e4c3fc8b05 Make git identity configurable in settings 2025-10-14 20:36:29 -05:00
Alex Gleason e9d7942e5e Remove unnecessary new Set calls 2025-10-13 19:41:59 -05:00
Alex Gleason 3cd6908d78 Fix cloning from git Nostr URLs 2025-10-13 19:33:48 -05:00
Alex Gleason a9a5cafcac Don't hardcode gitnostr.com 2025-09-27 16:26:07 -05:00
Alex Gleason a45e29578c Fix pulling 2025-09-26 20:49:02 -05:00
Alex Gleason 6d6f18a877 Swap out corsproxy.io for our custom proxy 2025-09-22 06:32:49 -05:00
Alex Gleason 92376d58b8 Use new corsProxy format 2025-09-22 06:04:29 -05:00
Alex Gleason 230d4bc443 Push to Nostr works! 2025-09-21 20:07:55 -05:00
Alex Gleason c0e00d40f7 Add getNostrRemoteInfo 2025-09-21 18:03:27 -05:00
Alex Gleason 9678041502 git push over Nostr 2025-09-21 17:55:14 -05:00
Alex Gleason bc907fdd63 Implement nostr fetch, pull 2025-09-21 17:27:12 -05:00
Alex Gleason 93983f88af Clone with the state commit from Nostr 2025-09-21 17:15:28 -05:00
Alex Gleason 72a537ce2e Refactor nostr git clone, add "nostr.repo" git config 2025-09-21 16:50:22 -05:00
Alex Gleason 3e502fa3a9 When cloning by Nostr URI, set the URI in the remote 2025-09-21 15:38:03 -05:00
Alex Gleason d3e257f759 Transfer Nostr clone logic into Git class 2025-09-21 14:45:27 -05:00
Alex Gleason 69c1000063 Refactor Git to accept a nostr object 2025-09-21 14:31:13 -05:00
Alex Gleason 7b5c9a5581 Convert AI providers into array instead of object, allow dragging to change their order 2025-09-21 13:11:04 -05:00
Alex Gleason 94e1a6543c Make corsProxy configurable 2025-09-14 17:58:41 -05:00
Alex Gleason 55120452c7 Add git wrapper class 2025-09-14 16:10:36 -05:00