upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/git
AgeCommit message (Collapse)Author
2026-02-18feat: handle missing optional patch tags for pr/ flowDanConwayDev
- Add mbox_parser module to extract metadata from patch content - Extract author/committer from From: and Date: headers when tags missing - Extract commit message body as fallback for description tag - Implement best-guess parent commit logic using committer timestamps - Update patch_supports_commit_ids to accept mbox-parseable patches - Enable patches without optional tags to appear as pr/ branches
2026-02-12fix: handle existing local branch that is behind when checking out PRDanConwayDev
When a PR branch already exists locally, the previous code would silently move the branch pointer without checking for tracking or fast-forward safety. Now: - If branch has tracking: checkout and warn user to git pull - If no tracking and fast-forward: safely move pointer - If no tracking and diverged: show copy-paste commands for reset/rebase - If commit not found locally: suggest fetching Uses console crate for yellow output instead of hardcoded ANSI codes.
2025-11-18test: nostr git url with pathDanConwayDev
add additional test to cover this scenario
2025-10-17chore: cargo updateDanConwayDev
update patches ahead of wider upgrade. clippy required some autofixes
2025-10-17feat!(nostr_url): replace user with ssh_key_fileDanConwayDev
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.
2025-10-17feat(send): add `merge-base` tag to PR (Update)DanConwayDev
following its inclusion in the NIP-34 spec
2025-08-01refactor: move patch size evaluation fn to libDanConwayDev
so we can use it in ngit as well as remote helper
2025-07-31fix: nip05 breaking changes in rust-nostrDanConwayDev
as its now 'bring your own transport'
2025-07-31chore: bump rust-nostr v0.43DanConwayDev
with trival breaking changes. nip05 changes will be done seperately.
2025-07-25fix(list): improve pr unsupport textDanConwayDev
and show a more helpful message when proposal can be checked out using the remote
2025-07-16chore: bump nightly rustfmtDanConwayDev
to latest available and apply fmt fixes
2025-07-16chore: nix flake updateDanConwayDev
required running: `cargo fix --allow-dirty --allow-staged` `cargo clippy --fix --allow-dirty -- -D warnings` to fix problems and then manually fixing some too
2025-07-16chore: cargo updateDanConwayDev
in prep for upgrade rust-nostr
2025-07-15feat: add git timeoutDanConwayDev
to improve reliability
2025-05-06chore: update git2 ~> v0.20.2DanConwayDev
we have had some bugs related to git2 so moving to the latest version
2025-05-06fix(clone_url): fix custom portsDanConwayDev
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
2025-05-05chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options run `cargo clippy --fix` and `cargo fmt` to fix new clippy errors
2025-04-01chore: bump rust-nostr v0.37 ~> v0.40DanConwayDev
and fix all of the breaking changes
2024-12-20refactor: use nostr url from repo_refDanConwayDev
simplify to allow the removal of warning: `#[allow(clippy::too_many_arguments)]`
2024-12-16feat(init): default to nip05 git nostr urlLaszlo Megyer
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.
2024-12-16chore: bump nix flake rust nightly `fmt` overlayDanConwayDev
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`
2024-12-16fix(NostrUrlDecoded): nip05 response errorDanConwayDev
improve the error message when fetching nip05 profile fails
2024-12-12fix: defend against empty`tags`DanConwayDev
prevent a panic when tags are of an unexpect length
2024-12-11fix(NostrUrlDecoded): nip05 parsed as ssh userDanConwayDev
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
2024-12-11fix(NostrUrlDecoded): add nip05 loading to TUIDanConwayDev
so the user understands the cause of any delay if the domain takes a while to respond
2024-12-10fix(nostr_url): use nip05 in nostr url if cachedDanConwayDev
prioritise using nip05 nostr url format when the nip05, public key mapping is stored in the (usually local) git config.
2024-12-10feat(nostr_url): improve nip05 git cache formatDanConwayDev
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.
2024-12-10test(NostrUrlDecoded): use `parse_and_resolve`Laszlo Megyer
update tests to use the async `parse_and_resolve` instead of removed `from_str` method
2024-12-10feat(NostrUrlDecoded) add nip05 supportDanConwayDev
replace `NostrUrlDecoded::from_str` with `NostrUrlDecoded::parse_and_resolve` store nip05 pubkey mapping in git cache
2024-12-03refactor: limit fetch to 1 trusted coordinateDanConwayDev
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.
2024-11-29feat(init): set remote `origin`DanConwayDev
check whether remote `origin` is nostr url and if not attempt to set it.
2024-11-27chore: bump rust-nosrt v0.37.0DanConwayDev
use RelayUrl in repo_ref which I had resisted as it mutates relay urls when printed to append a slash
2024-11-26refactor: err msgs 'cannot' > 'failed to'DanConwayDev
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
2024-11-21feat(login): overhaul login experienceDanConwayDev
* 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
2024-10-28chore: bump rust-nostr to patch near v0.36.0DanConwayDev
bump all rust-nostr packages refactoring code based on breaking changes upgrading to patched version to address signer issue: nostr:nevent1qvzqqqqqqypzq6xcz9jerqgqkldy8lpg7lglcyj4g3nwzy2cs6u70wejdaj7csnjqy88wumn8ghj7mn0wvhxcmmv9uqzpsw5ph8le2n2kh6uchftawt74hddazk9tp7wjmz967y2l0uva5rc7hsstq
2024-09-25chore: bump rust-nostr v0.35DanConwayDev
bump all rust-nostr packages
2024-09-24fix(login): locally when globally logged inDanConwayDev
as it would fail to save to local git config
2024-09-23fix(remote): add resilience to `prs`DanConwayDev
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.
2024-09-18test: fix gitlib2 version in sampleDanConwayDev
so they match v1.8.2 used in updated git2
2024-09-17feat(remote): store successful protocol in configDanConwayDev
if another protocol was tried first and failed
2024-09-12fix(remote): `push` status updatesDanConwayDev
push needs to use push_transfer_progress rather than transfer_progress
2024-09-12fix(remote): update copyDanConwayDev
to make it more like native git
2024-09-11refactor: fix fmt and clippy issuesDanConwayDev
which potentially were only identified when a dependancy was updated
2024-09-06fix(remote): `fetch` and `list` status copyDanConwayDev
so that it the filesystem url is shown
2024-09-06fix(remote): `list` apply protocols selectionDanConwayDev
used in fetch and tweak the error reporting
2024-09-06fix(remote): improve protocol selction / fallbackDanConwayDev
abstract the protocols and order to try under different scenarios add some additional scenarios eg hardcoded http tweak error reporting
2024-09-06refactor: render ServerProtocols lowercaseDanConwayDev
as they are easier to read
2024-09-06feat(remote): fetch protocol selection / fallbackDanConwayDev
enable override from nostr url clone url is local use local otherwise try https unathenticated, ssh, then https authenticated
2024-09-06add `CloneUrl`DanConwayDev
to enable remote to interact with git servers over a range of specified protocols
2024-09-04refactor: use FromStr trait for NostrUrlDecodedDanConwayDev
as it should have been used in the first place
2024-09-04refactor: fix imports, etc based on restructureDanConwayDev
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
2024-09-04refactor: organise into lib and bin structureDanConwayDev
the make the code more readable this commit just moves the files, the next commit should fix the imports