Let the git remote be set from Settings
Attaching a workspace to an existing repository meant leaving for a terminal: gitsync could init, commit and push, and could tell whether an 'origin' existed, but had no way to create one, and nothing in the settings held a remote URL. Sync just logged "no 'origin' remote configured" and committed locally. Settings > Git remote... now shows the workspace repository's origin and lets it be set, repointed or cleared. The URL is read from and written to the repository, never to config.json, because a remote belongs to the checkout — so each workspace shows its own, and the box is refreshed whenever the repository in play changes. This is separate from the Gitea publishing in New project, which is a cookiecutter post-gen hook and only ever applies to generated projects. Also factors out first_output_line, which repo_root and the new origin_url were both open-coding, and origin_args, so the add-vs-set-url decision can be tested without a repository on disk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBWj9TphFMCoh7VHaSRnvQ
This commit is contained in:
@@ -424,6 +424,10 @@ impl App {
|
||||
ui.close_menu();
|
||||
self.show_project_settings = true;
|
||||
}
|
||||
if ui.button("Git remote…").clicked() {
|
||||
ui.close_menu();
|
||||
self.open_git_remote();
|
||||
}
|
||||
if ui.button("Manuscript details…").clicked() {
|
||||
ui.close_menu();
|
||||
self.show_manuscript_settings = true;
|
||||
|
||||
Reference in New Issue
Block a user