| Age | Commit message (Collapse) | Author |
|
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.
|
|
Remove the patch_supports_commit_ids gates in checkout.rs and list.rs
that pre-dated the mbox fallback logic. apply_patch_chain already
handles all fallback cases. Also replace the main-branch TODO fallback
in make_commits_for_proposal with get_parent_commit_from_patch, which
uses timestamp-based best-guess when the parent-commit tag is absent.
|
|
only the maintainers and author of a poorly formatted proposal need
to know it was submitted but cant be created as a PR branch
|
|
abstracted git remote helper fetch functions
added support to `ngit list` to fetch PR data and checkout as proposal
branch
|
|
to make it's purpose clearer
|
|
to enable forthcoming `ngit sync` cmd
|
|
we try and get them from clone urls of repo and fallback to
those specified by contributor
|
|
in function, params and variable names
|
|
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
|
|
and fix all of the breaking changes
|
|
show draft as well as open PRs as remote branches
|
|
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`
|
|
update nix dependancies to latest version using default update options
fix warning related to idomatic patterns
|
|
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
|
|
bump all rust-nostr packages
|
|
or nostrconnect url string which is a much better UX flow for nip46
|
|
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.
|
|
so it clear which patch is causing issues and it continues to report
the fetch problem to the git client.
we need a better solution it degrades gracefully rather than
stopping the operation.
perhaps list needs to only list PRs which it can create from existing
data objects?
perhaps list also needs fetch objects before fetch is called?
|
|
remove the correct number of lines when reporter prints to
narrow terminals
|
|
if another protocol was tried first and failed
|
|
in progress updates as its not resolving any deltas
|
|
when they are sent via multiple messages
|
|
and slightly refactor
|
|
by only removing and rewriting transfer progress
|
|
by avoiding bugs where lines are removed accidentally by storing
report in a mutex and rewriting the entire report at each update
|
|
push needs to use push_transfer_progress rather than transfer_progress
|
|
to bring them more into line to the native git client
|
|
to bring them more into line to the native git client
|
|
based off of:
https://github.com/rust-lang/git2-rs/blob/master/examples/fetch.rs
|
|
instead of trying again over fallback protocols
|
|
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
|
|
abstract the protocols and order to try under different scenarios
add some additional scenarios eg hardcoded http
tweak error reporting
|
|
enable override from nostr url
clone url is local use local
otherwise try https unathenticated, ssh, then https authenticated
|
|
to make it easier to read
|