| Age | Commit message (Collapse) | Author |
|
Repository identifiers can contain any characters per NIP-01 d-tag rules.
Encode them in nostr:// clone URLs (display and parse) and in GRASP
/<npub>/<identifier>.git paths, aligning with NIP-34 and GRASP-01.
|
|
add additional test to cover this scenario
|
|
update patches ahead of wider upgrade. clippy required some autofixes
|
|
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.
|
|
as its now 'bring your own transport'
|
|
with trival breaking changes. nip05 changes will
be done seperately.
|
|
required running:
`cargo fix --allow-dirty --allow-staged`
`cargo clippy --fix --allow-dirty -- -D warnings`
to fix problems
and then manually fixing some too
|
|
only use custom port on specified protocol (ie. http, https or ssh)
ignore custom port on when trying other protocols
specify `ssh://` prefix when using custom port as otherwise it can
be ignored
|
|
update nix dependancies to latest version using default update options
run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
|
|
and fix all of the breaking changes
|
|
simplify to allow the removal of warning:
`#[allow(clippy::too_many_arguments)]`
|
|
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.
|
|
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`
|
|
improve the error message when fetching nip05 profile fails
|
|
property `user`, which refers to the ssh user to be used when
connecting to git remotes, was being parsed as the local section of
the nip05 address
|
|
so the user understands the cause of any delay if the domain takes
a while to respond
|
|
prioritise using nip05 nostr url format when the nip05, public key
mapping is stored in the (usually local) git config.
|
|
store all nip05s in a single git config item called "nostr.nip05"
using the `<nip05>:<hex-public-key>` format with multiple values
comma seperated.
git config is suposed to be human readable so it consideration was
given to storing the npub instead of hex but nip05 generally uses hex
and its rarely, if at all, going to be read directly by humans.
in the future it might be better to use git syntax for storing
multiple items but library git2 doesn't support this. it would be
trivial to do though. multiple nip05 items is an edge case so this
format is ok for now.
|
|
update tests to use the async `parse_and_resolve` instead of removed
`from_str` method
|
|
replace `NostrUrlDecoded::from_str` with
`NostrUrlDecoded::parse_and_resolve`
store nip05 pubkey mapping in git cache
|
|
previously fetch supported fetching multiple trusted coordinates at
once. The additional complexity trade off isn't worth it.
It will still fetch events related to the coordinates of maintainers
that the trusted maintainer lists.
A scenario where there might be multiple trusted coordinates is
where a large repo is split into multiple nostr repos to manage
pull requests and issues in seperate sub-units. I might therefore
have different remotes that target different identifiers.
There also might be different set of maintainers groups that are
have different views on the latest state of the same codebase and
they haven't split off into using different identifiers.
Its simplier ngit to fetch these different nostr repos independantly
when requested. git-remote-nostr will do this automatically as it
works through remotes but for ngit cmds a further change is required
so `get_repo_coordinates` and `try_and_get_repo_coordinates` prompts
to select the desired one.
|
|
check whether remote `origin` is nostr url and if not attempt
to set it.
|
|
use RelayUrl in repo_ref which I had resisted as it mutates relay
urls when printed to append a slash
|
|
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
|
|
if another protocol was tried first and failed
|
|
to make it more like native git
|
|
so that it the filesystem url is shown
|
|
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
|
|
to enable remote to interact with git servers over a range of
specified protocols
|
|
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
|