M4.10: remotes: fetch, pull, push, clone and manage remotes

Owner decision D23: Lutra runs fetch, pull (merge or rebase per the new
git.pull.mode setting), push (upstream set on the first push) and clone
through the user's git. Any HTTPS or SSH server works; sign-in stays with
git's credential helper (its own window is allowed for network calls only)
and the ssh agent. Terminal prompts stay off, ext:: is refused, and URL
userinfo is redacted in every message, progress line and remote listing.

- vcs: Call::network with a 30 min timeout, a stderr progress sink and a
  Cancel flag that kills git's process group; remote.rs with clone_repo,
  fetch, pull, push (--porcelain rejections), remotes and add/set-url/
  remove; explained refusals (rejected push, sign-in, host key, not found,
  unreachable, no upstream, local changes, conflicts).
- engine: git.fetch/pull/push/clone/cancel/remotes/remoteAdd/remoteSetUrl/
  remoteRemove, one network call at a time, gitProgress events,
  gitChanged after changes.
- ui: status-bar progress with Cancel and ahead/behind, vcs.fetch/pull/
  push/clone/manageRemotes (Git menu, no default shortcuts), Clone
  Repository and Manage Remotes dialogs; desktop pick_dir IPC.
- Tests against local bare repositories only (vcs 8, engine 3, Vitest 11)
  plus unit and property tests; docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-28 18:29:38 +01:00
parent 48b892a6d5
commit d097558ba5
36 changed files with 4426 additions and 45 deletions

View file

@ -21,11 +21,16 @@
"command.unavailable": "{command} cannot run right now",
"command.vcs.branches": "Branches…",
"command.vcs.checkout": "Check Out Branch",
"command.vcs.clone": "Clone Repository…",
"command.vcs.commit": "Commit…",
"command.vcs.fetch": "Fetch",
"command.vcs.manageRemotes": "Manage Remotes…",
"command.vcs.newBranch": "New Branch…",
"command.vcs.nextChange": "Next Change",
"command.vcs.openChanges": "Changes",
"command.vcs.previousChange": "Previous Change",
"command.vcs.pull": "Pull",
"command.vcs.push": "Push",
"command.vcs.refresh": "Refresh Changes",
"command.vcs.showDiff": "Show Diff",
"command.vcs.showHistory": "Show History",
@ -161,10 +166,20 @@
"notification.vcs.checkedOut": "Checked out {branch}",
"notification.vcs.checkoutFailed": "Git did not check out {branch}: {reason}",
"notification.vcs.checkoutNotSaved": "Checkout of {branch} cancelled: not every file could be saved first.",
"notification.vcs.cloned": "Cloned into {dir}",
"notification.vcs.commitNotSaved": "Commit cancelled: not every file could be saved first.",
"notification.vcs.committed": "Committed {hash}: {summary}",
"notification.vcs.fetchFailed": "Fetch failed: {reason}",
"notification.vcs.fetched": "Fetched from every remote",
"notification.vcs.historyNoFile": "Open a file or pass a path to show its history",
"notification.vcs.newBranchFailed": "Branch {branch} was not created: {reason}",
"notification.vcs.pullFailed": "Pull failed: {reason}",
"notification.vcs.pullNotSaved": "Pull cancelled: not every file could be saved first.",
"notification.vcs.pulled": "Pulled the current branch",
"notification.vcs.pushFailed": "Push failed: {reason}",
"notification.vcs.pushed": "Pushed {branch} to {remote}",
"notification.vcs.pushedUpstream": "Pushed {branch} to {remote} and set it as the upstream",
"notification.vcs.remoteCancelled": "Git operation cancelled",
"notification.vfs.pumpFailed": "Applying changes on disk failed: {reason}",
"notification.watch.failed": "Lutra stopped watching the project for changes on disk: {reason}",
"palette.label": "Command palette",
@ -242,6 +257,10 @@
"settings.error.stringTooLong": "Enter at most {max} bytes",
"settings.git.executable.description": "Path to the git program (2.30 or newer) that Lutra runs for version control. Leave empty to use git from PATH.",
"settings.git.executable.label": "Git executable",
"settings.git.pull.mode.description": "How Pull joins the commits it fetched with your local commits: a merge (fast-forward when possible) or a rebase of your local commits on top.",
"settings.git.pull.mode.label": "Pull mode",
"settings.git.pull.mode.value.merge": "Merge",
"settings.git.pull.mode.value.rebase": "Rebase",
"settings.hint.pathAuto": "Detected automatically",
"settings.php.executable.description": "Path to the PHP executable (8.2 or newer) that runs Phpactor. Leave empty to use php from PATH.",
"settings.php.executable.label": "PHP executable",
@ -320,6 +339,16 @@
"vcs.changes.unstageAll": "Unstage all",
"vcs.changes.unstageFile": "Unstage {path}",
"vcs.checkout.invalidParams": "vcs.checkout needs a branch name (params: branch).",
"vcs.clone.browse": "Browse…",
"vcs.clone.dir": "Folder",
"vcs.clone.fieldsEmpty": "Enter a URL and a folder.",
"vcs.clone.hint": "Any HTTPS or SSH URL, or a local path. Sign-in goes through Git: its credential helper (which may open its own window) or your SSH agent. Lutra never sees your password or keys.",
"vcs.clone.pickTitle": "Choose the folder to clone into",
"vcs.clone.run": "Clone",
"vcs.clone.running": "Cloning…",
"vcs.clone.title": "Clone Repository",
"vcs.clone.url": "Repository URL",
"vcs.clone.urlPlaceholder": "https://host/owner/repo.git or git@host:owner/repo.git",
"vcs.commit.amend": "Amend",
"vcs.commit.amendButton": "Amend Commit",
"vcs.commit.button": "Commit",
@ -359,6 +388,28 @@
"vcs.log.refresh": "Reload the history",
"vcs.log.toolWindow.title": "Log",
"vcs.log.truncated": "More files changed than are listed here.",
"vcs.remote.cancel": "Cancel the Git operation",
"vcs.remote.operation.clone": "Cloning",
"vcs.remote.operation.fetch": "Fetching",
"vcs.remote.operation.pull": "Pulling",
"vcs.remote.operation.push": "Pushing",
"vcs.remote.progress": "{operation}: {phase}",
"vcs.remote.progressPercent": "{operation}: {phase} {percent}%",
"vcs.remote.sync": "{ahead} commits to push and {behind} to pull ({upstream})",
"vcs.remotes.add": "Add",
"vcs.remotes.editUrl": "Edit URL",
"vcs.remotes.fieldsEmpty": "Enter a name and a URL for the new remote.",
"vcs.remotes.loading": "Reading remotes…",
"vcs.remotes.name": "Name of the new remote",
"vcs.remotes.namePlaceholder": "Name",
"vcs.remotes.none": "This repository has no remotes yet.",
"vcs.remotes.pushUrl": "push: {url}",
"vcs.remotes.remove": "Remove",
"vcs.remotes.removeQuestion": "Remove {name}?",
"vcs.remotes.title": "Manage Remotes",
"vcs.remotes.url": "URL of the new remote",
"vcs.remotes.urlEmpty": "Enter the new URL.",
"vcs.remotes.urlOf": "URL of {name}",
"vcs.state.added": "added",
"vcs.state.conflicted": "conflicted",
"vcs.state.copied": "copied",