upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin
AgeCommit message (Collapse)Author
2025-10-17feat!(nostr_url): replace user with ssh_key_fileDanConwayDev
replaces the "user" in the nostr_url format with "ssh_key_file", to support the original intent, which was to allow users to specify different authentication credentials. most git servers always expect the ssh user to be 'git'. the idiumatic way of specifying logging in as a different user is to specify a different ssh key. the idiomatic way of storing non-default ssh keys is in the location `~/.ssh/key_name`. "ssh_key_file" can be specified as `key_name`, for keys in the default location, or as a relative or absolute custom location eg. `/other_keys/.ssh/nym1` or `../.ssh/nym1`. BREAKING CHANGE: in nostr git url nym1@ssh/npub123/identifer, nym1 is now treated as ssh key file location rather than a ssh user. it can be specified as a file within `~/.ssh` eg `~/.ssh/nym1` or a full or relative path.
2025-10-17fix: pr or pr update merge supportDanConwayDev
fixes to change attempted in 4fc659074ec5ced3cc0727cf1f3e6af082a189cc
2025-10-17feat(send): add `merge-base` tag to PR (Update)DanConwayDev
following its inclusion in the NIP-34 spec
2025-10-10feat(send): add `force-pr` or `force-patch` flagsDanConwayDev
so users can choose when there commits are too big or small instead of relying on the 60kb rule
2025-09-12fix(sync): dont fetch tags available locallyDanConwayDev
as it was only checking if tip is a commit thats present but a tip could be an annotated tag
2025-09-11fix(sync): fetch refs missing locally before syncDanConwayDev
and fail more gracefully if refs cant be fetched, by continuing to sync other refs
2025-09-11fix: ngit binary enforce git server timeoutDanConwayDev
rather than just in the remote helper.
2025-09-11fix(init): clone url include grasp serversDanConwayDev
and include prompt about pushing understanding pushing directly to git servers
2025-09-11fix(init): simple mode non-grasp servers selectionDanConwayDev
list and allow selection / deselection of non-grasp servers when at least one grasp servers is selected and a non grasp server is a suggested default.
2025-09-10fix(init): when local repo missing origin refsDanConwayDev
now we check and fetch them
2025-09-10fix(init): when existing origin matches tipDanConwayDev
when an existing origin exists and local branch is up-to-date `git push` wont successfully publish state event and push refs to other git servers listed. we now publish the state event during this init function and use sync to push all refs in state are to all git servers.
2025-09-04feat(remote): use push PR non-interactive fallbackDanConwayDev
move the PR push code in 'ngit send' into lib. reuse the non-interactive fallbacks in git-remote-nostr
2025-09-03fix(remote): `refs/pr-by-id/*` ~> `refs/pr/*/head`DanConwayDev
to align more closely with githubs `refs/pull/*/head` we can pretend that pr means both Patch Request and Pull Request
2025-09-01fix: list shows `/pr` PRs when git data is localDanConwayDev
even if it is not on repository remotes, as it may have been pushed to a user's git server instead
2025-08-19feat(list): add PR fetch and checkout supportDanConwayDev
abstracted git remote helper fetch functions added support to `ngit list` to fetch PR data and checkout as proposal branch
2025-08-18fix(sync): include all valid nostr stateDanConwayDev
we weren't correctly identifying valid nostr state refs
2025-08-18fix(remote): push handle annotated tags syncDanConwayDev
handle scenario when correct annotated tag is on a remote. peel to tip commit doesnt give the correct oid so we must use the annotated tag oid instead when comparing.
2025-08-18feat(sync): add `ref-name` param to limit syncDanConwayDev
limit syncing to a single reference with this new parameter. change instructions for out of sync remotes to use sync with this new option.
2025-08-15feat(remote): list proposals as `refs/pr-by-id/*`DanConwayDev
This branch name cannot be attacked by brute forcing a shorthand event id like refs/pr/<branch-name(<shorthand-event-id) can.
2025-08-15feat(remote): list all proposals as `refs/pr/*`DanConwayDev
here we can list Pull Requests whose data aren't on the repo relays without causing `git clone nostr://` to fail. we can also list proposals of all statuses so that can review closed proposals.
2025-08-15fix: inaccessable PR commits breaks `git clone`DanConwayDev
we cannot list PRs under refs/heads/pr/* unless we are sure the oids are accessable on a git server as it will cause `git clone` to fail. we now only list PRs that are on accessable repo git servers under refs/heads/pr/*. we should be able to list them under under refs/pr/* as the clone command only fetches refs in refs/heads so we will do this seperately.
2025-08-07Merge branch 'add-prs-to-ngit-send'DanConwayDev
2025-08-07fix(send): refs not confirmed are usually acceptedDanConwayDev
having implemented 3b5c48f5a2a4b9be5d14baa8f5e801fefd5c1166, a ref pushed to refs/nostr/<event-id> on a github repo was accepted but was not confirmed
2025-08-07fix(send): PR cli outputDanConwayDev
to keep the user informed of whats happening / happend
2025-08-07fix(send): push PR refs to non-grasp serversDanConwayDev
attempt to use a range of protocols instead of unath http
2025-08-07refactor: rename fn `is_grasp_server_in_list`DanConwayDev
to make it's purpose clearer
2025-08-07fix(send): print event description before publishDanConwayDev
so its clear from the TUI what has just been sent
2025-08-07feat(init): use user grasp list for defaultsDanConwayDev
instead of relying on hardcoded grasp server options. couldn't we look up those selected for other repos for the user instead?
2025-08-07feat(send): PR fallback to user / custom graspDanConwayDev
if use is maintainer, push PR to all repo git servers. if user has a fork, push to all git servers it lists, and repo grasp servers. if user hasn't got a fork but has a user grasp list and pushing push to repo grasp servers fails, create a personal-fork automatically at each user grasp server and push there. fallback to prompting user for either grasp servers or git server with write permission. if user provides grasp servers, suggesting adding to user preference list.
2025-08-06feat(send): custom ref for PR clone urlDanConwayDev
allow specifying ref for pushing PR to custom clone url
2025-08-05feat(send): push PR to custom clone urlDanConwayDev
if the repo doesnt list any grasp servers, or pushing to them fails
2025-08-05feat(send): support PR and PR update eventsDanConwayDev
send as a PR if the commit would make patches that are too big for nostr events. send as a PR update if the proposal is PR. send as a PR, revising a patch root, if patches would be too big. in tests `get_pretend_proposal_root_event` has to be a actual proposal with a tip, rather than just a cover letter, so we have replaced it.
2025-08-04refactor: move generate pr event fn into libDanConwayDev
for future use in `ngit send`
2025-08-04fix: `t` tag `revision-root` ~> `root-revision`DanConwayDev
NIP-34 specifies patch revisions should have a `t` tag of `root-revision` whereas we have been using `revision-root`. this fixes it and and handles events created with the incorrect tag.
2025-08-04refactor: abstract pr event generation & ref pushDanConwayDev
so that we can use it in `ngit send`
2025-08-01fix: use new gitworkshop.dev url formatDanConwayDev
where just the nevent will do
2025-08-01refactor(send): abstract proposal commit checksDanConwayDev
as the function is too long
2025-08-01refactor: move patch size evaluation fn to libDanConwayDev
so we can use it in ngit as well as remote helper
2025-07-31fix: mention marker ~> q tag NIP-10 updateDanConwayDev
required for rust-nostr v0.43 update
2025-07-30fix(remote): support lightweight tagsDanConwayDev
I have now replicated the issue discussed in the last commit by overwriting my global git config item tag.gpgSign and setting it back to false, which is default the default. ngit was only supporting annotated tags and fiatjaf was pushing a lightweight tag. I'm confident that this will resolve the issue
2025-07-28fix(remote): push all tagsDanConwayDev
fiatjaf reported panic: ``` <commit-id> can not be successfully peeled into a tag (git_object_t=4). ``` when making a tag and running `git push --tags` I could not replicate but line it was coming from should use 'from' rather than 'to'.
2025-07-25feat(sync): add cmd to sync git serversDanConwayDev
with nostr state. optionally use 'force' flag
2025-07-25refactor: move push helpers to libDanConwayDev
to enable forthcoming ngit sync cmd
2025-07-25refactor: move `utils` and `list` helpers to libDanConwayDev
to enable forthcoming `ngit sync` cmd
2025-07-25fix(list): improve pr unsupport textDanConwayDev
and show a more helpful message when proposal can be checked out using the remote
2025-07-25fix: update help text for patches without parentDanConwayDev
adjust the help text to reflect availablity of PR event for when a patch is selected that doesnt list a parent commit id
2025-07-25feat(list): fix status for pr as patch revisionDanConwayDev
using the recently abstracted `get_status` function
2025-07-25feat(pr): add pr and pr update merge supportDanConwayDev
as these events use `c` instead of `commit`
2025-07-25refactor: abstract `get_status`DanConwayDev
for use by `ngit list`
2025-07-23fix(remote): improve pr error messagesDanConwayDev
as a temporary measure
2025-07-23fix(remote): dont send pr and patches on upgradeDanConwayDev
when an upgrade to a pr is needed, dont also try and send patches
2025-07-23fix(remote): error if pushed proposal is emptyDanConwayDev
erorr if the pushed ref would produce a proposal with no patches, or if the ref is in origin/<main-or-master>
2025-07-23refactor: Rename fallback relays and grasp serversDanConwayDev
Rename `params.fallback_relays` and `client.fallback_relays` to `relay_default_set`. Rename `params.fallback_grasp_servers` to `grasp_default_set`. This includes updating associated getters and usages across the codebase.
2025-07-23refactor: add fallback grasp servers to clientDanConwayDev
so that they can be used as part of push and send
2025-07-23feat(pr): patch upgraded to pr inherit pr statusDanConwayDev
when a patch is upgraded to a pr, eg because new commits would be too large to be additional patches, the patch receives a closed staus and the new pr 'e' tags the original root patch. we therefore need to inherit the new pr's status instead of using the closed status. the closed status was used so that clients don't have to support pr revisions of patches, and still have a good UX.
2025-07-23fix(status): only use events from author and maintainersDanConwayDev
instead of status events from any pubkey
2025-07-23feat(pr): updates and pr as patch revisionDanConwayDev
issue a pull request update if pushing or force pushing a pull request issue a pull request with an e tag for original patch and close status for the original patch when pushing or force pushing against a patch when the new commits are too big to be iussed as patches
2025-07-23refactor(pr): rename functionsDanConwayDev
to reflect there new role of also pushing prs to git severs
2025-07-22feat(pr): generate pr event > oversized patchDanConwayDev
but only for new proposals
2025-07-22fix: remove blossom from grasp server detectionDanConwayDev
a grasp server doesnt need to appear in repo announcement event `blossoms` tag as blossom has been removed from the grasp spec
2025-07-18feat(pr): fetch pr and pr updates from clone urlsDanConwayDev
we try and get them from clone urls of repo and fallback to those specified by contributor
2025-07-18feat(pr): list PR and PR updatesDanConwayDev
remote will list the refs under `pr/*` namespace. `ngit list` will display in the list of open / draft proposals. it won't yet fetch the related oids to enable fetching or checking out the branch.
2025-07-16chore: bump nightly rustfmtDanConwayDev
to latest available and apply fmt fixes
2025-07-15feat: add git timeoutDanConwayDev
to improve reliability
2025-06-19refactor: rename ngit_relay to graspDanConwayDev
in function, params and variable names
2025-06-19rename ngit-relay to graspDanConwayDev
includes a change to a git config itme name
2025-06-19refactor: move build state functionDanConwayDev
in preparation for enforcing the inclusion of HEAD
2025-06-17fix: support `git://` in clone urlsDanConwayDev
based on jb55 trying to use this with damus nostr:event1qvzqqqqqqypzqvhpsfmr23gwhv795lgjc8uw0v44z3pe4sg2vlh08k0an3wx3cj9qy88wumn8ghj7mn0wvhxcmmv9uq3jamnwvaz7tmjv4kxz7fwwdhx7un59eek7cmfv9kz7qpqec3c59c4yu4yrsa9fedu27rnygnemj2cfmumf6fw7385wfthg57slj72ux
2025-06-02fix: ignore dereferenced tags in stateDanConwayDev
as they are just noise
2025-05-31feat(init): only use one ngit-relay git server urlDanConwayDev
that of the current users pubkey. ngit will push to the git servers of other maintainers anyway.
2025-05-31feat(push): prevent push if no ann eventDanConwayDev
To ensure additional maintainers publish an annoucement event, require it for them to push
2025-05-24feat(init): make default ngit-relays configurableDanConwayDev
make the default set of ngit-relays configurable
2025-05-23feat(init): use dir name as default repo nameDanConwayDev
if you haven't cloned an existing nostr repo
2025-05-23feat(push): avoid out of sync issues for ngit relayDanConwayDev
we need to be careful with git servers with their own permissions so a ngit user doesn't inadvertantly push changes on top of a another user who pushed directly to the git server without using the force flag. We dont have this problem with ngit-relay so we can always force push, even if the user didnt as nostr is the authority of state.
2025-05-23feat(account): export npubDanConwayDev
allow exporting npub as well as nsec
2025-05-23fix(init): dont default to user read relay listDanConwayDev
as it usually full of inappropriate relays like purplepages.
2025-05-23fix(init): additional relays dont replace ngit-relaysDanConwayDev
instead of replacing ngit-relays with additoinal relays , suppliment
2025-05-23fix(init): improve cli outputDanConwayDev
for git push, a wait longer to allow ngit-relays to create repo
2025-05-23feat: only try http(s) for ngit-relaysDanConwayDev
otherwise it tries all the protocols and reprots on each
2025-05-23fix(init): ngit-relay usage detectionDanConwayDev
make sure blossom server is also present
2025-05-23fix: remove blossom url trailing slashDanConwayDev
when creating announcment with `ngit init`
2025-05-22refactor: cargo fmtDanConwayDev
should have done it at 4dc5d0c9fb170981cf4fade5558d7cc8da404aa3
2025-05-22feat(init): add blossomDanConwayDev
add a blossom tag to the repo announcement
2025-05-22feat(init): overhaul & simplify with ngit-relaysDanConwayDev
introduce ngit-relays as a way of setting git servers and relays at the same time using a standard for specific repo locations: https://<domain-port-path>/<npub>/<identifer>.git add simple and advanced modes. prompt less. eg always set remote origin to nostr url. automatically push main or master branch.
2025-05-21fix: remove accidental printlnDanConwayDev
the details are included as default options
2025-05-21feat(init): dont ask about state unless neededDanConwayDev
reduce the scenarios where we confuse users about state
2025-05-21feat: add --customize flag for instructionsDanConwayDev
of how to customise ngit via git config items
2025-05-21feat: add support for default relay overridesDanConwayDev
via git config so they can be overwritten locally and globally
2025-05-09fix: always try git servers over other protocolsDanConwayDev
remove the code that guessed whether it was an authentication failure and gave up is it wasn't. this prevents it from trying http for push when ssh is not supported eg. ngit-relay
2025-05-05chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
2025-04-28fix(init): replace legacy gitworkshop urlDanConwayDev
with new format. but both default option and when previous web string used legacy format
2025-04-03feat(send): add description to event signing processDanConwayDev
resolving nostr:note1qu8le4a8qz9hhxy6q85txejcq0kln0r3s9vdtwrhtqwvauc6nxuqn3fj0z so it doesnt appear frozen when there are lots of events being signed by a remote signer
2025-04-01fix: allow soft push if not behind serverDanConwayDev
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.
2025-04-01chore: bump rust-nostr v0.37 ~> v0.40DanConwayDev
and fix all of the breaking changes
2024-12-20feat(remote): include draft PRsDanConwayDev
show draft as well as open PRs as remote branches
2024-12-20fix(push): find existing proposalDanConwayDev
improve reliability of getting current logged in user to assess if they have submitted a proposal with the same name / branch name
2024-12-20refactor: branch_name handlingDanConwayDev
improve clarity by renaming variables and methods defend against `branch-name` tag with an unsafe name
2024-12-20refactor: use nostr url from repo_refDanConwayDev
simplify to allow the removal of warning: `#[allow(clippy::too_many_arguments)]`
2024-12-16feat(init): default to nip05 git nostr urlLaszlo Megyer
If the user has NIP-05 set up in profile, and it resolves at the time of running `ngit init`, NIP-05 will be used in the nostr remote url.
2024-12-16chore: bump nix flake rust nightly `fmt` overlayDanConwayDev
update the rust nightly `fmt` overlay which needs to be pinned to a specific version (this case by date) update formatting in main files via `cargo fmt`