57a9c84b4678
replace doctor --offline with --fast in scripts and documentation (3.8.3)
- time
- 2026-10-06 22:25 UTC · 6 days ago
- machine
- Junes-MacBook-Pro.local
- agent
- gpt-6
- session
- clarify koh manual
- parent
- 744c2018c7ea
↓ koh-57a9c84b.tar.gzatlas at this save
files changed6 files
README.md+1 −1VERSION+1 −1shell/koh3.plugin.zsh+1 −1src/cli/cmd_doctor.v+3 −6tests/cli_test.v+5 −5v.mod+1 −1README.md+1 −1
@@ -176,7 +176,7 @@176176 177177 `doctor` checks the database, stored content, history, events, working files178178 and configuration. It also verifies remote history and release files by default.179-Use `--offline` for a local check. The report names each check, its result,179+Use `--fast` for a local check. The report names each check, its result,180180 and any part it could not verify.181181 Its backup command writes a consistent copy of `.koh`. Use it instead of182182 copying the database while Koh is using it. Keep a live `.koh` out of cloudshell/koh3.plugin.zsh+1 −1
@@ -167,7 +167,7 @@167167 steal) _arguments '--yes' '--list' '--mine' '--theirs' '--json' ;;168168 ignore) _arguments '--global[edit ~/.kohignore for every repo]' '--yes[skip the question]' '--json' '*:path:_files' ;;169169 strip) _arguments '--yes[skip the yes/no question; paths still typed]' '--save[one save]:save:_koh3_ids' '*:path:_files' ;;170- doctor) _arguments '--offline[skip remote content checks]' '--fast[skip the slow remote audit]' '--json[print the report as JSON]' '--yes[remove old peek folders]' '--backup[copy .koh to]:path:_files' ;;170+ doctor) _arguments '--fast[skip the slow remote audit]' '--json[print the report as JSON]' '--yes[remove old peek folders]' '--backup[copy .koh to]:path:_files' ;;171171 build) _arguments '*--platform[target platform]:platform:(macos-aarch64 macos-x86_64 linux-aarch64 linux-x86_64)' '--all' ;;172172 update) _arguments '--check' '--yes' '--json' ;;173173 migrate) _arguments '--lane[Koh 2 lane]:lane:(dev main)' '*--with[a lost version, from a backup]:file:_files' '--yes[skip the question]' '--json' ;;src/cli/cmd_doctor.v+3 −6
@@ -17,7 +17,7 @@1717 pub fn cmd_doctor(raw []string) int {1818 args := parse('doctor', raw, Options{1919 values: ['backup']20- flags: ['json', 'yes', 'offline', 'fast']20+ flags: ['json', 'yes', 'fast']2121 }) or { return usage_error(err.msg()) }2222 if args.positional.len > 0 {2323 return usage_error('doctor takes no positional arguments')@@ -68,11 +68,8 @@6868 report.wal_bytes = os.file_size('${report.database}-wal')6969 doctor_remote_config(mut report)7070 // The remote audit is nearly all of Doctor's time, so --fast skips exactly that.71- skip := if args.flag('offline') {72- 'offline'73- } else if args.flag('fast') { 'fast' } else { '' }74- if skip != '' {75- report.checks << DoctorCheck{'remote audit', 'skipped', '--${skip} requested; remote content not checked'}71+ if args.flag('fast') {72+ report.checks << DoctorCheck{'remote audit', 'skipped', '--fast requested; remote content not checked'}7673 } else {7774 working('auditing remote history and releases (read-only)')7875 doctor_remote(store, mut report) or { report.check('remote audit', [err.msg()]) }tests/cli_test.v+5 −5
@@ -2101,7 +2101,7 @@21012101 assert run(repo, 'doctor', 'unexpected').code == 221022102 }21032103 2104-fn test_doctor_checks_the_remote_by_default_and_offline_explicitly_skips_it() {2104+fn test_doctor_checks_the_remote_by_default_and_fast_explicitly_skips_it() {21052105 repo := temp_repo('doctor-remote')21062106 home := temp_repo('doctor-remote-home')21072107 bucket := temp_repo('doctor-remote-bucket')@@ -2124,13 +2124,13 @@21242124 assert bad.code == 121252125 assert bad.out.contains('damaged remote object')21262126 assert bad.out.contains('"name":"SQLite integrity","status":"pass"')2127- offline := run_home(repo, home, 'doctor', '--offline', '--json')2128- assert offline.code == 02129- assert offline.out.contains('--offline requested')2130- assert offline.out.contains('"status":"skipped"')21312127 fast := run_home(repo, home, 'doctor', '--fast', '--json')21322128 assert fast.code == 021332129 assert fast.out.contains('--fast requested')2130+ assert fast.out.contains('"status":"skipped"')2131+ removed := run_home(repo, home, 'doctor', '--offline', '--json')2132+ assert removed.code == 22133+ assert removed.err.contains('--offline')21342134 }21352135 21362136 fn test_doctor_returns_a_report_when_the_database_cannot_be_opened() {v.mod+1 −1
@@ -1,6 +1,6 @@11 Module {22 name: 'koh3'3- version: '3.8.2'3+ version: '3.8.3'44 description: 'One SQLite file per repo, one line of history.'55 license: 'MIT'66 }