| Age | Commit message (Collapse) | Author |
|
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
|
|
so it is done consistantly across ngit and the remote helper
|
|
so that it only finds branch name not prefixed with `pr/` if
you are the author of the pr as there may be duplicate named prs.
|
|
as since `cl.get_branch_name` has been introduced branch names
could be prefixed with a pr and sometimes postfixed with an event id
|
|
push needs to use push_transfer_progress rather than transfer_progress
|
|
by using words or short phrases
|
|
adding new errors that are authentication related
|
|
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
|
|
so that attempts can be made to use a fallback protocol
|
|
to make it more like native git
|
|
which potentially were only identified when a dependancy was updated
|
|
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
|
|
abstract the protocols and order to try under different scenarios
add some additional scenarios eg hardcoded http
tweak error reporting
|
|
as they are easier to read
|
|
enable override from nostr url
clone url is local use local
otherwise try https unathenticated, ssh, then https authenticated
|
|
to enable remote to interact with git servers over a range of
specified protocols
|
|
to make it easier to read
|
|
as it should have been used in the first place
|
|
move some functions out of ngit and into lib/mod
and lib/git_events
remove MockConnect from binaries so it is only used in the library.
this was done:
* mainly because automocks were not being imported from
lib into each binary
* but also because the these functions were being
tested with MockConnect
|
|
the make the code more readable
this commit just moves the files, the next commit should fix the imports
|
|
add protocol and user parameters so that users can overide the
protcol in the clone url and use specific protocols for
fetch and push. see:
nostr:nevent1qvzqqqqqqypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqyxhwumn8ghj7mn0wvhxcmmvqqsp6a5ck6grd9lq0nu25dcfzggxde67erut76w0ucal5rcfq4y5gzc7gmpzm
the override feature hasn't been implemented yet but
this is an enabler.
also added a new format so that macos (zsh) users don't
have to use quotes:
nostr://<optional-protocol>/npub123/<optional-relay>/identifer
|
|
so clone urls align to fetch rather than push.
see discussion here:
nostr:nevent1qvzqqqqx25pzpp59a0hkv5ecm45nrckvmu7pnk0sukssvly33u3wwzquy4v037hcqyxhwumn8ghj7mn0wvhxcmmvqqs2tdha5ymadffrkdprachsz6gsgsy6kc8gkntgq750mfn7u3aeu3g7xt8k9
|
|
ssh clone urls are problematic as it requires authentication for
fetching if users don't ave ssh keys setup for authentication with
the git server. so cloning / fetching will fail.
some users only authenticate using https and some only using ssh
so we cant just use https for everything.
this commit falls back to the other protocol if the first one failed
for list, fetch or push
|
|
as reported by arjen and tracked via:
nostr:nevent1qvzqqqqx25pzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy2hwumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6qpqur335cpnlktwkhv43d8sdk24dpu79jnfuk9qyvk7kga6aencm77sj7e8fa
as our tests are connecting to clone url in the file system its difficult to write a test for this
|
|
as authentication is always required if clone url is ssh
|
|
bump all rust-nostr packages
I'm not sure I'm completely happy with allowing mutable_key_type
but it is just run inside tests
it appears that Event didn't have the Copy trait in v0.33.0 so I'm
not sure why this warning suddenly appeared
the timeout of client.get_events_of needed to be doubled which could
indicate that an ineffiency has been introduced in v0.34.0
the primary motivation for upgrading now was to get this fix:
nostr:nevent1qqsffl2ld678pjj77rh9k2g4edljmxdu6ew4lvgnglxv7jhu3ru8vvcpp4mhxue69uhkummn9ekx7mqzyzsq3hh327t0h2dq6matqn5064cgj2zanl2stkj6s0lg4t2h5dty6rm2ucm
as I suspect it is also effecting other repositories
eg nostr-profile-manager
|
|
as this has reduced in importance as the user begins by
selecting a trusted maintainer
|
|
clone fails due to error:
`Error: failed to fetch objects in nostr state event from:`
interestingly this error doesnt appear when the git url is a
local repository in a file server so the tests dont fail
|
|
and update / issue a state event.
normal users can only push branches prefiex with pr/
and these go on nostr, not the git server.
|
|
use ^{} postfix for the commit id and without postfix for the tag id
|
|
from `prs/`.
whilst plural reflects usage of `heads` and `tags` in git refs,
singular is shorter and more reflective of usage of branch prefixes
such as `feature/` `fix/`
|
|
unless nostr.repo git config is set look for coodinates in git
remotes that use the nostr format
|
|
as the function is getting to long and we are about to add more to it
|
|
so it can be used by repo_ref which doesnt import git_remote_helper
|
|
so the user knows that a merge commit event will be issued
|
|
when a merge commit is being pushed that merges a patch in a proposal
|
|
issue new proposal when new branch is pushed into `prs/*` namespace,
which doesn't match an existing proposal
|
|
will updates the proposal rather than trying to issue a new one
|
|
remove the (<short id>) post fix for remote proposal branches when
the current user is the author
this enables pushing new proposals without having to change the
upstream branch in a way that remote helpers weren't designed to do
|
|
fix [PATCH n/n] when no cover letter and patches great than 1
fixes error where the first patch would be
[PATCH] followed by [PATCH n/n]
|
|
will issue a proposal revision
|
|
in the event of a proposal revisions
|
|
so that ancestors come first
|
|
not when only a proposal branch was being pushed
|
|
this caused `git clone` to fail and obviously changed HEAD
broken by 406f6d70f6a71cbd8796268f6c36711e893ab9d5
|
|
so that only the author and repo maintainers can push to a proposal
|
|
push commits as patches to a proposal or propoal revision
|
|
dont send refspec to a git server which was rejected due to
a conflict highlighted on a different git server
|
|
that have been proposal tips returned by `list` can be found
|
|
rather than head / working directory so that we can create commits
in the background
|
|
as the `refs/heads/` prefix wasn't present
|
|
as the namespace is reserved for nostr patches
|
|
so that user knows what step we are on
|
|
and filters out other branches in `prs/*` namespace
|
|
but behind local.
correctly report on situation and allow push
|
|
instead of the full url so messages are easier to read
|
|
so it is clearer and easier to read
|
|
so it is clearer and easier to read
|
|
1. don't attempt to push to a remote which is already up-to-date
2. don't attempt to delete branch on remote if it is already deleted
3. only push when out of sync if remote tip is ancestor of pushed
commit
4. force push to remote if user force pushed and remote is in sync
with nostr
|
|
In preparation for its reuse within `push`
|
|
so we have a status update and know which server is slow
|
|
so it is more concise and clear
|
|
with git servers.
this will also form the basis of preventing failed pushes
|
|
as it was hardcoded to test value
|
|
This reverts commit 3d2e031294b467be725a4ac5f5e65e029d25699a.
|
|
use stderr to write lines that get displayed when run
as a git-remote-helper
|
|
This reverts commit 6b63f150ba9e7c69bf83bcbd24543051c765c9f6.
|
|
use `stderr` to write lines that get displayed when run
as a git-remote-helper
|
|
as `stderr` is being used when it shouldn't be
|
|
This reverts commit 4a38d5f4179114fce60f84c4694284a49f648c64.
|
|
unless there were errors and detailed report doesnt clear
|
|
as rust-nostr doesn't add trailing slash to relays
|
|
instead of manually set. aligns with ngit version.
|
|
support with optional relays as query parameter
|
|
in prep for supporting new format
|
|
listed in the announcement `clone` tag
|
|
initially we push to the first server, if successful update the
state event, then siliently push to the others and silently fail
|
|
so that if the git server is ahead of the state announcement,
only the commits in the state annoucement will be downloaded
|
|
and falls back to git server is state event cant be found
|
|
ensure refs are included in state event
use `HashMap` to improve `RepoState` struct
|
|
if no previous state events can be found it replicates git server
otherwise it just updates pushed value
|
|
to more easily access state details
|
|
and move code identifying git server url into `list`, `fetch` and `push`.
|
|
in preparation for managing state via nostr
|
|
if multiple maintainers produce state events with the same
timestamp, the event with the largest event_id will be used
|
|
only update remote ref when push was successful
|
|
so main doesn't grow too large
|
|
pass outcome back to git to enable reporting
|
|
requests so that the git_server is called once
rather than many time in serial
|
|
by using GitAuthenticatior credential callback directly
rather than its `push` method
|
|
push was not updating remote refs after the anon remote was being pushed
|
|
in the future we could implement our own credentials callback function
to remove the dependancy
|
|
as a simple proxy to the first git server listed in announcement
parse clone url as `nostr://naddr123...`
|