Let error messages stay until read; show the remote form on the welcome screen
Error messages now stay for 8 seconds or until clicked, and keep each hint on its own line. The welcome screen shows how to start gites with a repository on another machine. The spec follows these changes and the new ssh options and socket folder.
This commit is contained in:
@@ -35,7 +35,7 @@ one character, and no local folder with exactly that name exists. Every other te
|
||||
local folder. So `C:\code\x` and `C:/code/x` stay local, `./a:b` stays local, and a
|
||||
folder in the current folder named `notes:2024` stays local when it exists.
|
||||
|
||||
A path on the server that starts with `~/` is handed to the server's shell with the
|
||||
A path on the server that is `~` or starts with `~/` is handed to the server's shell with the
|
||||
`~` outside the quotes, so the shell expands it to the home folder there.
|
||||
|
||||
## Running git
|
||||
@@ -49,6 +49,7 @@ A path on the server that starts with `~/` is handed to the server's shell with
|
||||
|
||||
```
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10
|
||||
-o ServerAliveInterval=5 -o ServerAliveCountMax=2
|
||||
-o ControlMaster=auto -o ControlPath=<socket> -o ControlPersist=10m
|
||||
user@myserver "git -C '/srv/app' 'log' '--format=…' …"
|
||||
```
|
||||
@@ -57,12 +58,18 @@ A path on the server that starts with `~/` is handed to the server's shell with
|
||||
has no terminal to ask in. Keys and the ssh agent work.
|
||||
- `ConnectTimeout=10`: a server that does not answer gives an error after 10 seconds
|
||||
instead of a window that waits for ever.
|
||||
- `ServerAliveInterval=5`, `ServerAliveCountMax=2`: when a server stops answering
|
||||
on a connection that is already open (also a shared one), ssh notices it in about
|
||||
10 seconds and gives an error instead of waiting for ever.
|
||||
- `ControlMaster`, `ControlPath`, `ControlPersist`: the first command opens one
|
||||
connection and leaves it open; later commands go through it and cost about one
|
||||
network round trip each instead of a new login. The connection closes 10 minutes
|
||||
after the last command. The socket is `gites-%C` in the user's runtime folder
|
||||
(`/run/user/<id>` on Linux), or in `/tmp` where there is none; `%C` is a hash ssh
|
||||
makes from the host, port and user, so the path stays short.
|
||||
(`/run/user/<id>` on Linux). Where there is none (always on macOS), it is in a
|
||||
`gites` folder in the user's cache folder, made so that only the user can open it;
|
||||
never in `/tmp`. If neither folder can be found or made, these three options are
|
||||
left out and every command opens a new connection. `%C` is a hash ssh makes from
|
||||
the host, port and user, so the path stays short.
|
||||
- On Windows, ssh cannot share connections, so these three options are left out and
|
||||
every command opens a new connection.
|
||||
- Quoting: every word of the git command is put in single quotes, and a `'` inside a
|
||||
@@ -107,6 +114,12 @@ If the connection drops while a repository is open, the next command shows its e
|
||||
as a message at the bottom of the window and the graph that is already on screen
|
||||
stays. The next reload connects again by itself.
|
||||
|
||||
A message that reports an error stays for 8 seconds, or until it is clicked, and each
|
||||
hint line above stays on its own line. Other messages go after 1.8 seconds, as before.
|
||||
|
||||
The commands that run git run away from the thread that draws the window, so the
|
||||
window does not freeze while it waits for a slow server.
|
||||
|
||||
## Tests
|
||||
|
||||
- Reading locations: `host:/path`, `user@host:/path`, `host:~/x`, `C:\x`, `C:/x`, a
|
||||
|
||||
Reference in New Issue
Block a user