upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/git.rs
AgeCommit message (Collapse)Author
2024-08-08fix(remote): `fetch` unsigned commit changed HEADDanConwayDev
this caused `git clone` to fail and obviously changed HEAD broken by 406f6d70f6a71cbd8796268f6c36711e893ab9d5
2024-08-07refactor(git): apply patch to treeDanConwayDev
rather than head / working directory so that we can create commits in the background
2024-08-05feat(remote): `push` handle out-of-sync serversDanConwayDev
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
2024-07-26feat(remote): add nostr git remote helperDanConwayDev
as a simple proxy to the first git server listed in announcement parse clone url as `nostr://naddr123...`
2024-07-17feat(login): use fetch to get user profileDanConwayDev
fetch automatically gets updates to logged in user profile / relays fetching without specifying repo pointers will just fetch user profiles so that can be used during login, if user profile isn't in cache login now uses fetch
2024-06-28feat(login): login with nip46 remote signerDanConwayDev
and save details in git config
2024-06-25refactor: replace keys with signerDanConwayDev
so that nip46 bunker signing can be added
2024-06-13feat(git): add get and save git config itemDanConwayDev
local or global but tests only added for local
2024-06-13chore: bump rust-nostr to v0.32.0DanConwayDev
both nostr and nostr-sdk packages and also in test_utils fix the many breaking changes fix: ignore trailing slash when depuplicate relays for send events. this was picked up as TagStandard::RelayMetadata has started adding a traling slash. refactor cli output test function `expect_send_with_progress` so that relays can succeed / fail in a random order
2024-05-07feat(send): `in-reply-to` tags npubs and eventsDanConwayDev
in addition to being used to create a new proposal revision, in-reply-to can now be used to reference other events and npubs. for example an issues or kind 1 threads where the proposal is relevant the proposal will only be marked as a revision if the first parameter is a reference to an existing proposal root
2024-03-22use Sha1Hashin new locationDanConwayDev
it had moved from 'prelude' to 'hashes'
2024-03-22chore: nix flake updateDanConwayDev
update nix dependancies to latest version using default update options
2024-03-22chore: cargo updateDanConwayDev
update dependancies to latest version stated in cargo.toml
2024-03-08fix: stack overflow bugDanConwayDev
introduced in 098b0258fdd581c750099cb463adbddb57843388
2024-03-08feat(send): compare against origin/main vs mainDanConwayDev
catch more errors when proposed commits are not connected to origin/main branch improve default selected commits when on main branch
2024-03-08feat(send): select commits from a listDanConwayDev
when since_or_range isn't specified adds resilience as assuming master..HEAD can cause some issues eg when master is not up-to-date with origin/master
2024-02-22fix: apply patches errorDanConwayDev
introduced in 9f1d8cd964a04197565a2acb1f2b174c9582d333
2024-02-22refactor: fix spellingDanConwayDev
ammended should read amended
2024-02-22fix: applying commits that exist in other branchesDanConwayDev
previously these commits would be skipped
2024-02-22fix(pull): local rebase detected as ammendmentsDanConwayDev
also updated copy and code comments
2024-02-22feat(pull): support `--in-reply-to` revisionsDanConwayDev
added tests to cover one of these rebase scenarios
2024-02-21feat(send): in-reply-to arg for revised proposalDanConwayDev
send a revised version of a proposal using the new in-replyto argument suppliments existing 'root' tag with 'root-revision' e 'reply' tag to the original proposal
2024-02-21feat(send): specify commits eg HEAD~2DanConwayDev
specifiy commits or commit ranges in the same way that `git format-patch` allows
2024-02-20refactor: imrpove error msgDanConwayDev
when trying to create a branch from a proposal when the the parent commit id doesnt exist
2024-02-16refactor: rename PR to proposalDanConwayDev
PR is a problematic term when it ambiguous whether the set of patches are PR-like or email-patch like.
2024-02-16refactor: improve error when patch ahead of masterDanConwayDev
minor improvement to error message
2024-02-16refactor: remove reliance on 'commit' tagDanConwayDev
as part of nip34 compliance
2024-02-14feat!: move `prs create`>`send`, `prs list`>`list`DanConwayDev
remove unnecessary hierachy of `prs` which is also a troublesome term replace the concept of `create` which aligns more to the PR github model to `send` which aligns more with the git patch model
2024-02-13feat!: nip34 make pr event optionalDanConwayDev
use first patch as thread root if pr event isn't present. begin renaming pr event to cover letter. fix patch ordering upon creation. patches were in youngest first order which caused: - `PATCH n/t`to be in reverse order - the youngest patch was the marked root - oldest patch replied to the youngest fix finding most recent patch event. when a patch in a set is the most recent it will share a created_at with other patches. previously the first patch recieved from relay in the set would be used. now it finds the first patch with that created_at which isn't also a parent of another patch with the same created_at.
2024-02-13feat(prs-create)!: pr to nip34-like cover letterDanConwayDev
up the pr event type to a nip34-like cover letter format this sets the building blocks in place to enable simplier clients to use the 'cover letter' feature in `git format-patch` to create the experience as a pr event
2024-02-09refactor(git): find root commit from headDanConwayDev
this is simpler there is no need to check whether main or master exist because one does 99+% of the time the root commit wil be te same for head as master 99+% of the time
2024-02-09feat(prs-create): add `PATCH n/n` to contentDanConwayDev
format patch as a series in the patch event content unless it is 1/1 and there is no pr (cover letter) event
2024-02-02feat(prs-create)!: use nip34 patch kind and tagsDanConwayDev
- change kind number - remove "r-" prefix from unique commit id r tag - rename tag commit-sig to commit-pgp-sig - a tag for repo identifer and pubkey. this serves as a vote for this pubkey being a maintainer - add relay hints - change format of committer tag - remove r references to parent commit id - tag parent patch event if its part of change request author and commit-message tags still need to be removed but they are required to apply patches with gitlib2. we will need to fallback to running the git client to apply patches. BREAKING CHANGE: change patch/commit event kind and tags to reflect nip34 draft. events with the older kind will no longer be found and will not be in a valid format
2024-01-23feat(prs-list): check for clean repoDanConwayDev
before checking out PR branch add confirm prompt before checking out branch and applying changes
2024-01-22feat(git): apply pgp sig event tag to commitDanConwayDev
to maintain correct commit ids which is required to apply multiple commits its noted that no tests are written and the scenario where the author and committer differ has not been tested clearly the validate_patch_applied function has code that corrects an error where the author / committer 'signatures' do not apply correctly. this will not be fixed under a pgp signed commit scenario.
2024-01-22feat(git) save pgp sig in patch eventDanConwayDev
so that commit ids can be maintained
2023-12-12feat(claim) create yaml add maintainers and relaysDanConwayDev
- create yaml file with maintainers and relays - add maintainers to repo event - add current user as maintainer - custom repo relays from cli argument - save git-server in repo event
2023-12-08feat(push) push commits to existing prDanConwayDev
- find pr with a branch-name that matches checked out branch - check branch isnt behind latest patch on pr - push new commits a patches associated with pr
2023-12-01feat(prs-list) list and pull selected as branchDanConwayDev
- fetch prs and present as a selectable list - create and / or checkout branch for selected pr - apply latest patches as commits
2023-11-01feat(git) create and checkout branchDanConwayDev
add RepoActions trait methods to checkout ref, create branch at commit and check if a commit exists
2023-11-01feat(prs-create) add pr tag branch-name and titleDanConwayDev
tag pr event with title, description and the name of the current checkedout branch
2023-10-01feat(prs-create) send to multiple relaysDanConwayDev
add tests but these currently don't work when run together
2023-10-01feat(prs-create) find commits and create eventsDanConwayDev
- identify commits - create pull request event - create patch events