| Age | Commit message (Collapse) | Author |
|
When pushing a pr/ branch, the ahead slice is reversed by callers before
being passed to generate_patches_or_pr_event_or_pr_updates, making it
oldest-first. The tip/first_commit assignments were backwards (using
first()/last() as if the slice were youngest-first), so the merge-base
was computed as the parent of the PR tip rather than the parent of the
oldest commit. Multi-commit PRs therefore showed only 1 commit when
applied via ngit apply.
Adds an integration test that pushes a two-commit large-file PR branch
and asserts the merge-base tag equals the main branch tip.
|
|
update_remote_refs_pushed was calling peel_to_commit() for all refs,
discarding the tag object OID for annotated tags. This caused a mismatch
with generate_updated_state, which correctly stores the tag object OID in
the nostr state event. ngit sync would then push the commit OID to grasp
servers that expected the tag object OID, causing rejections.
|
|
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.
|
|
refspec_remote_ref_name() only stripped refs/heads/, so tag refspecs
produced refs/remotes/origin/refs/tags/v1.0.0 instead of
refs/remotes/origin/v1.0.0. ngit sync reads the latter form, so the
tracking ref was never found and sync failed with 'src refspec does not
match any existing object'.
|
|
When all git servers reject or skip a push, delete the newly-published
state event from the local nostr cache and restore the previous state
event (if any), so that a subsequent retry starts from a clean baseline
rather than a state that no server ever accepted.
|
|
When publishing the nostr state event before a git push, use the relay
results from send_events to skip any grasp server whose internal relay
did not receive the event. Print a clear warning for each skipped server
and emit error lines for all refs if no git servers remain to push to.
|
|
Change send_events() return type from Result<()> to
Result<Vec<(String, bool)>> so callers can inspect which relays
accepted events. Update the finish message to show
"Published to X/N relays (failed: ...)" instead of the unconditional
"Published ... to nostr relays".
|
|
Any -o option passed to `git push` that is not handled by ngit
(title, description) is forwarded verbatim to the git server via
git2::PushOptions::remote_push_options. This allows options such as
`-o secret-scanning.skip` to pass through transparently.
`ngit send` gains a matching -o / --push-option flag for the same
purpose.
|
|
move apply_grasp_infrastructure, latest_event_repo_ref to lib/repo_ref.rs
and wait_for_grasp_servers + grasp_servers_from_user_or_fallback to a
new lib/accept_maintainership.rs so both binaries can share them.
add accept_maintainership_with_defaults which publishes the co-maintainer's
own Kind:30617 announcement with defaults (user grasp servers, shared
metadata from existing events) then waits for grasp server provisioning
and updates nostr.repo config and origin remote.
replace the push error block with a call to accept_maintainership_with_defaults
so pushing now silently accepts co-maintainership instead of failing.
|
|
the previous message said 'run ngit init' with no explanation of why or
what it does. the new message explains the user has been offered
co-maintainership, names the repo, and points to 'ngit init -d' for a
fast non-interactive acceptance path.
|
|
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.
|
|
Git wraps push-option values in double quotes and doubles backslashes
when the value contains special characters. This broke \\n escape
decoding because the key arrived as '"description' instead of
'description'. Added strip_git_quoting() to reverse git's quoting
before parsing the key=value pair.
|
|
The title and description push-options were previously only applied to PR
creation but not to patch series generation. When force-pushing to update
an existing patch series, the custom title and description were ignored.
This change passes the title_description parameter to the patch generation
function, allowing users to customize patch series cover letters via:
git push --force --push-option=title="Title" \
--push-option=description="Description" origin branch
Includes integration test for force-pushing patches with custom cover letter.
|
|
Git push-options are line-based so literal newlines cannot be sent.
Users can now write the two-character sequence \n which is decoded
into real newlines before publishing. Use \\n for a literal backslash-n.
Includes unit tests, integration test, help text, and changelog entry.
|
|
Previously, providing only one of title or description would silently
ignore both. Now returns a clear error message.
|
|
Allows setting PR title and description via git push options:
git push --push-option=title="My PR" \
--push-option=description="Details" origin pr/branch
|
|
always report publishing and finish with published
|
|
so that report gets removed when not in verbose mode
and fix removal so summary displayed instead 1st line of original report.
|
|
to ensure verbose mode is used during tests
|
|
fetching_with_report_for_helper unconditionally cleared the progress
reporter, wiping error bars that showed relay timeouts. Only clear
when all relays succeeded (or in verbose mode where bars were always
visible), matching the pattern in fetching_with_report.
|
|
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.
|
|
Progress reporters were not being cleared after successful operations,
leaving progress bars visible in the terminal output. Now they are
properly cleared when all operations complete without errors.
|
|
Update push operations to use non-interactive mode by default, removing
prompts that would block automated git operations.
|
|
fix breaking changes
|
|
as its useful information
|
|
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.
|
|
to ensure we dont try and fallback to ssh
|
|
update patches ahead of wider upgrade. clippy required some autofixes
|
|
only the maintainers and author of a poorly formatted proposal need
to know it was submitted but cant be created as a PR branch
|
|
fixes to change attempted in 4fc659074ec5ced3cc0727cf1f3e6af082a189cc
|
|
following its inclusion in the NIP-34 spec
|
|
move the PR push code in 'ngit send' into lib.
reuse the non-interactive fallbacks in git-remote-nostr
|
|
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
|
|
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.
|
|
limit syncing to a single reference with this new parameter.
change instructions for out of sync remotes to use sync with this new
option.
|
|
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 make it's purpose clearer
|
|
allow specifying ref for pushing PR to custom clone url
|
|
if the repo doesnt list any grasp servers, or pushing to them fails
|
|
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.
|
|
for future use in `ngit send`
|
|
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.
|
|
so that we can use it in `ngit send`
|
|
so we can use it in ngit as well as remote helper
|
|
required for rust-nostr v0.43 update
|
|
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
|
|
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'.
|
|
to enable forthcoming ngit sync cmd
|
|
to enable forthcoming `ngit sync` cmd
|
|
as these events use `c` instead of `commit`
|
|
for use by `ngit list`
|
|
as a temporary measure
|
|
when an upgrade to a pr is needed, dont also try and send patches
|
|
erorr if the pushed ref would produce a proposal with no patches, or
if the ref is in origin/<main-or-master>
|
|
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.
|
|
instead of status events from any pubkey
|
|
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
|
|
to reflect there new role of also pushing prs to git severs
|
|
but only for new proposals
|
|
we try and get them from clone urls of repo and fallback to
those specified by contributor
|
|
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.
|
|
to latest available and apply fmt fixes
|
|
to improve reliability
|
|
in function, params and variable names
|
|
includes a change to a git config itme name
|
|
in preparation for enforcing the inclusion of HEAD
|
|
based on jb55 trying to use this with damus
nostr:event1qvzqqqqqqypzqvhpsfmr23gwhv795lgjc8uw0v44z3pe4sg2vlh08k0an3wx3cj9qy88wumn8ghj7mn0wvhxcmmv9uq3jamnwvaz7tmjv4kxz7fwwdhx7un59eek7cmfv9kz7qpqec3c59c4yu4yrsa9fedu27rnygnemj2cfmumf6fw7385wfthg57slj72ux
|
|
as they are just noise
|
|
To ensure additional maintainers publish an annoucement event,
require it for them to push
|
|
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
|
|
via git config so they can be overwritten locally and globally
|
|
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
|
|
resolving
nostr:note1qu8le4a8qz9hhxy6q85txejcq0kln0r3s9vdtwrhtqwvauc6nxuqn3fj0z
so it doesnt appear frozen when there are lots of events being signed
by a remote signer
|
|
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.
|
|
and fix all of the breaking changes
|
|
show draft as well as open PRs as remote branches
|
|
improve reliability of getting current logged in user to assess if
they have submitted a proposal with the same name / branch name
|
|
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`
|
|
update nix dependancies to latest version using default update options
fix warning related to idomatic patterns
|
|
comparing different versions of the nostr url string
|
|
as it was way too long
|
|
publish a merge event when the commit author signature and timestamp
match patches within an open proposal
|
|
allow any order of the commit ids
|
|
should alway list only the three-way merge commit id.
|
|
prevent a panic when tags are of an unexpect length
|
|
enable nostr git url format
alongside and
format
Merge branch 'pr/nip05-lez(ff1845c0)'
|
|
replace `NostrUrlDecoded::from_str` with
`NostrUrlDecoded::parse_and_resolve`
store nip05 pubkey mapping in git cache
|
|
get the latest user relay list before pushing patches and repo
announcement events
|