| Age | Commit message (Collapse) | Author |
|
when a repo has multiple nostr:// remotes sharing the same identifier,
relays can return state events authored by maintainers of the other
remote. without filtering, the newest event wins regardless of author,
pointing refs at the wrong commits.
state event candidates in run_list are now filtered to maintainers of
the current remote's repo announcement.
|
|
Only advertise `refs/heads/pr/*` branches once their tip OIDs are
confirmed present locally; prevents `fatal: bad object` / `remote did
not send all necessary objects` errors during clone/fetch when a PR tip
lives on a different git server than the one that won the bulk prefetch
race.
After the bulk prefetch, collect remaining missing PR tip OIDs and do
one batch fetch per repo git server using only the OIDs that server has
advertised; break early once all are satisfied and skip servers that
carry none. Avoids batch-poisoning (a server rejects the whole request
if any single OID is absent) and redundant connections.
Restrict mop-up fetches and run_fetch to the repo's declared git
servers; do not fetch from clone-tag URLs in PR events - they are
submitter-supplied and could let a malicious or slow server stall every
clone/fetch operation.
Also apply rustfmt and fix clippy warnings.
|
|
git-remote-nostr now walks the per-relay state events captured in
FetchReport::state_per_relay (newest first) and advertises the first
one whose every OID is either present on at least one git server
(confirmed via list_refs) or already available locally. If no such
state event exists it falls back to the raw git server state.
Previously the latest nostr state event was always used regardless of
whether its OIDs had been pushed to any server, causing catastrophic
missing-object errors during clone or fetch when a state event was
published ahead of the corresponding git push.
|
|
Shows a progress spinner when fetching from git remotes in non-verbose mode.
Suppresses git fetch output and listing messages when not in verbose mode.
Uses NGITTEST environment variable for test timeouts.
|
|
copy relay fetching approach to async and reporting
|
|
so it doesnt use the git_repo
|
|
so it shows a summary rather than a lot of lines of issues
|
|
also reduce the clutter in the cli output for grasp servers.
|
|
only the maintainers and author of a poorly formatted proposal need
to know it was submitted but cant be created as a PR branch
|
|
to align more closely with githubs `refs/pull/*/head`
we can pretend that pr means both Patch Request and Pull Request
|
|
even if it is not on repository remotes, as it may have been pushed
to a user's git server instead
|
|
abstracted git remote helper fetch functions
added support to `ngit list` to fetch PR data and checkout as proposal
branch
|
|
This branch name cannot be attacked by brute forcing a
shorthand event id like refs/pr/<branch-name(<shorthand-event-id)
can.
|
|
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.
|
|
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.
|
|
to enable forthcoming `ngit sync` cmd
|
|
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.
|
|
in function, params and variable names
|
|
as they are just noise
|
|
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.
|
|
otherwise it tries all the protocols and reprots on each
|
|
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
|
|
update nix dependancies to latest version using default update options
run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
|
|
show draft as well as open PRs as remote branches
|
|
improve clarity by renaming variables and methods
defend against `branch-name` tag with an unsafe name
|
|
simplify to allow the removal of warning:
`#[allow(clippy::too_many_arguments)]`
|
|
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`
|
|
in nearly all cases 'cannot' was used when an action was tried and
failed. 'failed to' is strictly better because:
* just because the action didn't work that time doesnt mean it
cannot work
* it is better at drawing the users attention to a problem
|
|
* simplify login menu, making it more accessable to newcomers and
easier to select remote signer options
* enable `ngit login` to work from anywhere (not just a git repo)
* assume fresh login details saved to global git config but fallback
to local repository
* maintain local repository login via `ngit login --local`
* maintain login via CLI arguments eg `ngit send --nsec nsec123`
* nudge users to remember nsec when pasting in ncryptsec for a
better UX, whilst maintaining the option to be prompted for
password everytime
* create placeholder menu items for help menu and create account
|
|
currently the prefix is missed when listing refs after pushing a pr
|
|
bump all rust-nostr packages
|
|
make poorly formatted patches fail silently. we stop trusting that the
`commit` tag in the latest patch can be produced by apply the patches.
to achieve this we must recreate the commit during the list command,
which require fetching the parent oids.
support patches without optional `commit` and `parent-commit` tags.
|
|
if another protocol was tried first and failed
|
|
so it doesn't remain in the TUI
|
|
to bring them more into line to the native git client
|
|
to make it more like native git
|
|
enable override from nostr url
clone url is filesystem use filesystem
otherwise try ssh, then https authenticated
unless clone url is http, then try ssh then http as we assume,
we are on a local trusted network.
|
|
so that it the filesystem url is shown
|
|
and don't proceed to https or http
|
|
used in fetch and tweak the error reporting
|
|
to make it easier to read
|
|
as it should have been used in the first place
|