| Age | Commit message (Collapse) | Author |
|
as part of the easy on-boaridng flow
|
|
to reflect the new interface and testing only nsec login
|
|
when already logged, the option to login locally with different keys
try to login globally
|
|
add some basic copy under help
|
|
as a minor UI improvement
|
|
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
|
|
adding a prompt makes it easier for the eye to pick up the issue.
|
|
there was a bug in `Interactor` so that reports were turned off by
default for choices.
This was embodied into the CLI tests but this turns them on in these
scenarios.
|
|
which should always be true but was defaulting to false when the
`dont_report` functions were added
|
|
reverts a change in f79014235e85554e3661b3f2a02b8fa88bc192ff which
caused a subtle change to how choices were displayed that caused
the cli tester error when choices without prompts were displayed eg.
in `ngit list` tests
|
|
to guide the users how to login dispite the git config errors
|
|
instead of needing to include the local flag
|
|
because a user might be logged in to the same account locally
and globally
|
|
if a local and or global account is already logged in, prompt to
logout before overwriting with new login details
|
|
previously cli args were only used during other commands to bypass
normal login
|
|
it previously only worked from within or near a git repo directory
|
|
for the simpliest UX it creates and publishes a profile and relay
list event.
|
|
rather than any key press as `esc` wasn't included as a key press
|
|
don't ask the user to press any key to proceed once the signer
successfully responds.
various approaches were to tried await either any key press or the
signer reponse such as `tokio::oneshot`, `tokio::mpsc` and
`tokio::watch` but all would keep the process running until key
press. this solution of aborting with `signal::ctrl_c` prevents the
work around of asking the user to press any key upon
the signer reponse.
|
|
* 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
|
|
rust-nostr v35/v36 changed the `pool.send_event_to` error message to
use 'event/s not published' instead of the error message
from the relay. `relay.send_event` supplies the useful error message.
|
|
identification of signer has been removed from rust-nostr.
until it is added back in we must always prompt the user about
signing as if its a local signer the message will be removed
before the user sees it.
unfortunately this is picked up by the tests so we must
only prompt the user when not running tests.
|
|
when there is an npub listed in git config but login was via direct
cli arguments to the current process, the wrong npub would be used.
this is the case for the ngit_init tests.
this can be more eligantly if rust-nostr NostrConnect::new() were
updated to accept user public key as requested here:
https://gitworkshop.dev/r/naddr1qvzqqqrhnypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqq5un4wd6z6mn0wd68y2z2qh0/issues/note1qa2pty0mnjhsme3thza24u3nv8u7859fqw2qg6fuyx9w00e2gekqvl3yg9
|
|
on get the user public key from the remote signer when it is unknown
so that read operations aren't blocked by being unable to reach
remote signer
|
|
bump all rust-nostr packages to latest issued version.
there have been some breaking changes to nip46 and this applies
these changes.
|
|
This reverts commit 43b5e9b38bf5dcfbac85637a2d3efc69ddfe77ac.
|
|
instead of printing an error when `git-remote-nostr` is called
directly instead of via plugin, provide some guidance
|
|
simplify api to encougage use of the git plugin
|
|
muntiny wallet has shut down and removed its blaster relay
|
|
when multiple maintainers enable opting out of storing state on nostr
this prevents other maintainers from pushing a state to the
git server which nostr servers wouldnt see because they are using the
nostr state.
|
|
by first asking if the user is the only maintainer and if so not
showing the npub selection option
|
|
based on user testing and feedback
|
|
when the user has set a remote to a nostr url but hasn't initiated
the repository on nostr - dont error but instead use the identifier
in the remote
|
|
bump all rust-nostr packages
refactoring code based on breaking changes
upgrading to patched version to address signer issue:
nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
|
|
as sqlite is depricated in rust-nostr
|
|
which includes nip46 signer change so it can be initated
without completing connection.
|
|
currently the prefix is missed when listing refs after pushing a pr
|
|
bump all rust-nostr packages
|
|
if login details are known, log in straight away and respond to auth requests.
users can make a choice whether to sign these using their nip46 signer
|
|
as it would fail to save to local git config
|
|
or nostrconnect url string which is a much better UX flow for nip46
|
|
originally this was disabled because there was a concern that it
would effect the operation of the remote helper due as it prints
to stdout.
it now only writes to stderr.
|
|
as 30s is too short for those of us fumbling with
our remote signer app
|
|
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.
|
|
to both tell users where events have been sent / failed to be sent
and to provide a status update so the user doesn't think its crashed
|
|
so they match v1.8.2 used in updated git2
|
|
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
|
|
improved for push to each git server. report now reflects new
branch / tag, delete branch / tag and force flag.
|
|
in the TUI as its not useful
|
|
ensure commit id from and two are the correct way around
|
|
so that other protocols are not tried after push was successful
|
|
if another protocol was tried first and failed
|
|
use the same approach taken with reporting remote status in `push`
as is used in `fetch`
|
|
in progress updates as its not resolving any deltas
|
|
when they are sent via multiple messages
|
|
and slightly refactor
|
|
by avoiding bugs where lines are removed accidentally by storing
report in a mutex and rewriting the entire report at each update
|
|
so it doesn't remain in the TUI
|
|
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
|