mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-16 03:09:33 +01:00
Merge pull request #714: feat(git): a Fetch button in the Git status header, and an interval for it app-wide and per case
Conflict in CLAUDE.md (Adding Features, App setting) resolved by keeping both sides: #714's sentence that a setting the server acts on must be synced, after the `.strict()` clause, and #719's mutateSettingsFile() rule at the end of the bullet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
6612a89ebc
36 files changed
+3662
-44
No files matched your search
@@ -84,8 +84,26 @@ by folder** (per device, on by default) shows changed files under collapsed fold
|
||||
window; off lists every file by its full path. **Git status: max repositories** (per device,
|
||||
1 to 50, default 12) is how many repositories the window lists when a session's folder holds
|
||||
several projects. **Git status: git timeout** (per device, 5 to 120 seconds, default 30) is how
|
||||
long one git command may run before that repository is reported as unreadable; raise it for
|
||||
repositories on a slow network share.
|
||||
long one git command may run before that repository is reported as unreadable, and the same value
|
||||
bounds the Git window's Fetch button; raise it for repositories on a slow network share.
|
||||
|
||||
**Git fetch on an interval** (synced, off by default) runs `git fetch` on a timer for the repositories the
|
||||
Git window lists, so the `behind` number is current without a click, and **Git fetch: how often** (synced,
|
||||
30 to 3600 seconds, default 300) is the gap between runs for a session that has no override of its own — timed from
|
||||
the start of a run, so a slow repository does not push the next one out. These are the only Git settings
|
||||
that are synced rather than per device, because the server's scheduler is what acts on them: kept per
|
||||
device, the scheduler would read nobody's number. **Session Options → Git** overrides both the switch and
|
||||
the interval for one session, and that override wins even while the app switch is off; a session that follows
|
||||
the app shows the app's values and its rows go inert until you turn **Follow the app setting** off. Nothing is
|
||||
ever fetched for a Docker or remote (SSH) session, and a repository a container can write to is refused
|
||||
before any git runs. Sessions open on the same folder share one run, and a folder is fetched when ANY session open on it is due, so the order the sessions were read cannot decide which interval wins. Both default to off because `git fetch`
|
||||
is the one git command the Git window runs that writes — cloning and worktree management write too, but only
|
||||
when you asked for them at the moment you asked — and the one that can run a repository's own hooks
|
||||
(`reference-transaction`, `pre-auto-gc` through the maintenance a fetch triggers, and config commands such as
|
||||
`credential.helper`), and the one that can run later by itself, on a timer. The ssh it runs is BatchMode so
|
||||
nothing waits for a login, and that is a default, never an override: your own `GIT_SSH_COMMAND`, or the
|
||||
repository's `core.sshCommand`, is used when either is set. ⚠️ The default's `StrictHostKeyChecking=accept-new`
|
||||
records an unknown host key in `~/.ssh/known_hosts` without asking — BatchMode stops a prompt, not a write.
|
||||
|
||||
Most default to off. The stock desktop header is system stats, File Viewer, Tiles, and the gear.
|
||||
**Header Stats Style** picks how the system stats and plan usage are drawn: *Compact*
|
||||
|
||||
@@ -245,12 +245,31 @@ Click it for a draggable window, in the style of the File Viewer:
|
||||
left out; the **git timeout** setting raises how long it waits. They all start collapsed (each summary line shows its branch and
|
||||
what is outstanding), and the ones you open stay open when the window refreshes; an unrelated repository above the workspace (a dotfiles repo
|
||||
in your home folder) is ignored.
|
||||
- **Fetch** in the header runs `git fetch` for the repositories the window lists, on your click; the
|
||||
window then re-reads, so "behind" is as of that fetch. A repository that could not be fetched keeps
|
||||
its row and shows why. **Git fetch on an interval** (Settings → Bottom bar, off by default) runs the
|
||||
same fetch on a timer for every session that is on, and **Session Options → Git** overrides both the
|
||||
switch and the interval for one session — a session that turned itself on runs even while the app-wide
|
||||
switch is off, sessions open on the same folder share one run, and nothing is ever fetched for Docker or
|
||||
remote (SSH) sessions.
|
||||
|
||||
It is read-only and offline: Codeman never fetches, commits or changes the repository, so
|
||||
"behind" is as of your last fetch. It is not shown for Docker or remote (SSH) sessions, and a repository at or inside a Docker case
|
||||
workspace is skipped even from a local session (a container can write there, and git would run
|
||||
that repository's own configuration on the host). The
|
||||
data comes from `GET /api/sessions/:id/git-status` and `GET /api/sessions/:id/git-diff`
|
||||
It is read-only apart from that fetch: Codeman never commits, checks out or changes the
|
||||
repository, and `git fetch` writes remote-tracking refs only — it is the only git command the Git window
|
||||
runs that writes, the only one that can run a repository's own hooks (`reference-transaction`,
|
||||
`pre-auto-gc` through the maintenance a fetch triggers, and config commands such as `credential.helper`),
|
||||
and the only one that can run later by itself, on a timer: cloning and worktree management write too, but
|
||||
only when you asked for them at the moment you asked, which is why nothing runs on a timer until you opt in. A fetch holds git's ref lock, so an agent's own `git pull` in the same repository
|
||||
can hit the same `cannot lock ref`, and a folder is fetched by one run at a time. It is not shown for Docker
|
||||
or remote (SSH) sessions, and a repository at or inside a Docker case
|
||||
workspace is skipped even from a local session, before any git runs (a container can write there,
|
||||
and git would run that repository's own configuration on the host). Fetch asks nothing of you: it
|
||||
uses the sign-in your own git already has, and it gives up quickly rather than waiting on an
|
||||
invisible login prompt. That BatchMode ssh is a default, never an override: your own
|
||||
`GIT_SSH_COMMAND`, or the repository's `core.sshCommand`, is used when either is set, and ⚠️ the default's
|
||||
`StrictHostKeyChecking=accept-new` records an unknown host key in `~/.ssh/known_hosts` without asking —
|
||||
BatchMode stops a prompt, not a write. The
|
||||
data comes from `GET /api/sessions/:id/git-status`, `GET /api/sessions/:id/git-diff` and, on that
|
||||
click or the interval you turned on, `POST /api/sessions/:id/git-fetch`
|
||||
(see the [API reference](https://github.com/Ark0N/Codeman/blob/master/docs/api-reference.md)).
|
||||
|
||||
## Gotchas
|
||||
|
||||
Reference in new issue
Block a user