feat(repo): add repo unarchive and repo rename, and report archive and delete

repo unarchive restores an archived repository, and repo rename renames
one, moving the Git remote or the saved default repository that selected
it to the new name. The archived-repository hint now points to
tea repo unarchive.

repo archive asks "Archive alice/x? It becomes read-only." and warns
"! alice/x is already archived" without a request when there is nothing
to do. Archive, unarchive, rename and delete confirm with a ✓ line on a
terminal, and --json returns the repository.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 23:51:45 +02:00
1 parent eedbe9893d
commit 7cd13ef64e
6 files changed
+327 -46

No files matched your search

+1 -1
View File
@@ -167,7 +167,7 @@ func conflictHint(ctx context.Context, apiErr *transport.APIError, conflict *ser
switch conflict.Reason {
case services.ReasonArchived:
if conflict.Scope != "" {
return "unarchive it with: tea repo edit " + conflict.Scope + " --archived=false"
return "unarchive it with: tea repo unarchive " + conflict.Scope
}
case services.ReasonExists:
return existsHint(ctx, apiErr, conflict)