create local repo

This commit is contained in:
2026-09-03 13:59:54 +07:00
parent 01f0540726
commit c0f06d095e
4 changed files with 155 additions and 15 deletions
+14
View File
@@ -582,3 +582,17 @@ The manual e2e checklist above still needs a real GRASP-06 server run.
(fork import, GRASP-06 hosting, suggestions, deferred items explicit);
`docs/TODO.md` updated; this log added. Manual e2e (§9) not yet run
against a live GRASP-06 server.
- **Fix (after e2e, user report)** — creating a repository left the
project only inside the app's GitCache mirror: the announcement, state
event and push happened, but the folder chosen in the Create Repository
dialog was just remembered as a settings default. `Backend::
create_repository` now also materializes a working copy at
`<folder>/<sanitized-name>` (cloned from the mirror via a `file://` URL
so it shares the announced history exactly, then `origin` re-pointed at
the first grasp server through the new `signed_git::set_origin`), and
the dialog records it as a checkout (`CheckoutsStore`, so the New PR
panel pre-fills it), opens it in the system file manager and opens the
repository panel. Materialization runs before any event is published,
so a failure aborts creation cleanly with nothing announced. Two new
`signed_git` tests (`set_origin_creates_or_replaces_the_remote`,
`working_copy_cloned_from_the_mirror_matches_head_and_origin`).