Commit Graph

220 Commits

Author SHA1 Message Date
Michael Eischer d494e37dc1 ui/termstatus: reorder findUnchangedLines function 2026-05-14 10:42:13 +02:00
Michael Eischer 59697213f9 ui/termstatus: cleanup test code 2026-05-14 10:42:13 +02:00
Michael Eischer df2d65bb88 ui/termstatus: test skipping of unchanged lines 2026-05-14 10:42:13 +02:00
Michael Eischer bd8aad3b9b ui/termstatus: deduplicate error handling 2026-05-14 10:42:13 +02:00
Michael Eischer cf34130a05 ui/termstatus: simplify status tracking 2026-05-14 10:42:13 +02:00
Donggyu Kim e33bcede2f terminal: Do not write unchanged status lines
Check if each line of status is changed, and write
the line to the terminal only if it has changed
2026-05-14 10:42:13 +02:00
Michael Eischer 4c0dc9e202 index: support incremental index loading
Do not require a full index reload if only a few additional index files
have been added. This can drastically speed up loading the index in the
mount command.
2026-05-07 22:52:03 +02:00
Michael Eischer 7077500a3b Have backup -vv mention compressed size of added files (#5669)
ui: mention compressed size of added files in `backup -vv`

This is already shown for modified files, but the added files message
wasn't updated when compression was implemented in restic.

Co-authored-by: Ilya Grigoriev <ilyagr@users.noreply.github.com>
2026-02-18 21:24:29 +01:00
Michael Eischer e1a5550a27 test: use generics in Equal function signature
This simplifies comparing a typed value against nil. Previously it was
necessary to case nil into the proper type.
2026-01-31 20:03:38 +01:00
Ilya Grigoriev 79c37f3d1a ui: mention compressed size of added files in backup -vv
This is already shown for modified files, but the added files message
wasn't updated when compression was implemented in restic.
2026-01-15 18:39:16 -08:00
Michael Eischer ebc51e60c9 Merge pull request #5626 from MichaelEischer/lazy-status
ui: only redraw status bar if it has not changed
2025-12-03 21:29:35 +01:00
Michael Eischer 1e6ed458ff remove old // +build comments 2025-11-30 11:53:23 +01:00
Michael Eischer ae6d6bd9a6 ui: only redraw status bar if it has not changed 2025-11-29 22:09:41 +01:00
Michael Eischer aa0fb0210a Merge pull request #5556 from greatroar/cleanup
ui/backup: Prepend, then sort (micro-optimization)
2025-10-12 18:22:36 +02:00
Michael Eischer 536a2f38bd Merge pull request #5554 from MichaelEischer/termstatus-flush
termstatus: flush before reading password from terminal
2025-10-12 17:59:03 +02:00
greatroar 20b38010e1 ui/backup: Prepend, then sort (micro-optimization) 2025-10-06 16:16:37 +02:00
Michael Eischer 30ed992af9 termstatus: flush output before returning OutputRaw() writer
This prevents mangling the output due to delayed messages.
2025-10-05 16:14:16 +02:00
Michael Eischer f17027eeaa termstatus: flush before reading password from terminal 2025-10-04 23:06:57 +02:00
Michael Eischer 4759e58994 Reduce terminal progress fps to 10 2025-10-04 17:34:40 +02:00
Michael Eischer 56ac8360c7 data: split node and snapshot code from restic package 2025-10-03 19:10:39 +02:00
Michael Eischer d8da3d2f2d termstatus: increase test coverage 2025-10-03 18:55:46 +02:00
Michael Eischer f2b9ea6455 termstatus: use errWriter if terminal commands fail 2025-10-03 18:55:46 +02:00
Michael Eischer f045297348 termstatus: fix typo in comment 2025-10-03 18:55:46 +02:00
Michael Eischer 52eb66929f repository: deduplicate index progress bar initializaton 2025-10-03 18:55:46 +02:00
Michael Eischer b459d66288 termstatus: additional comments 2025-10-03 18:55:46 +02:00
Michael Eischer 76b2cdd4fb replace globalOptions.stdout with termstatus.OutputWriter 2025-10-03 18:55:46 +02:00
Michael Eischer c293736841 drop unused stderr from GlobalOptions 2025-10-03 18:55:46 +02:00
Michael Eischer 1939cff334 restore: embed progress.Printer in restore-specific printer 2025-10-03 18:55:46 +02:00
Michael Eischer 1a76f988ea backup: embed progress.Printer in backup specific printer 2025-10-03 18:55:46 +02:00
Michael Eischer e753941ad3 move NewProgressPrinter to ui package 2025-10-03 18:55:46 +02:00
Michael Eischer ff5a0cc851 termstatus: fully wrap reading password from terminal 2025-10-03 18:55:46 +02:00
Michael Eischer 96af35555a termstatus: add stdin and inject into backup command 2025-10-03 18:55:46 +02:00
Michael Eischer 3410808dcf deduplicate termstatus setup 2025-10-03 18:55:46 +02:00
Michael Eischer 1ae2d08d1b termstatus: centralize OutputIsTerminal checks 2025-10-03 18:55:46 +02:00
Michael Eischer c745e4221e termstatus: use errWriter instead of os.Stderr 2025-10-03 18:22:42 +02:00
Michael Eischer 08443fe593 Merge pull request #5405 from restic/dependabot/github_actions/golangci/golangci-lint-action-8
build(deps): bump golangci/golangci-lint-action from 6 to 8
2025-09-21 22:37:26 +02:00
Michael Eischer daeb55a4fb Merge pull request #5511 from greatroar/atomic
ui/progress: Restore atomics in Counter
2025-09-21 22:29:40 +02:00
Michael Eischer 60d80a6127 Fix linter warnings 2025-09-21 22:24:15 +02:00
Michael Eischer 65b21e3348 ui: collect Quote and Truncate helpers
Collect ui formatting helpers in the ui package
2025-09-21 16:44:23 +02:00
Michael Eischer 86ddee8518 ui: document Message / Printer / Terminal interfaces 2025-09-21 16:32:00 +02:00
greatroar a8f506ea4d ui/progress: Simplify Updater
Removed a defer'd call that was a bit subtle.
2025-09-16 09:56:33 +02:00
greatroar 0a1ce4f207 ui/progress: Restore atomics in Counter
We switched from atomics to a mutex in #3189 because of an alignment
bug, but the new-style atomic types don't need manual alignment.
2025-09-16 09:49:48 +02:00
Michael Eischer 94b19d64be termstatus: allow retrieving the underlying writer
This is intended for special cases where it must be guaranteed that the
output on stdout exactly matches what was written to the io.Writer.
2025-09-15 22:17:26 +02:00
Michael Eischer 03600ca509 termstatus: don't buffer stdout
There's not much use in doing so as nearly every write call was paired
with a flush call. Thus, just use an unbuffered writer.
2025-09-15 21:22:07 +02:00
Michael Eischer 91ecac8003 termstatus: fix crash when printing empty string 2025-09-15 20:25:17 +02:00
Michael Eischer 32b7168a9e centralize index progress bar for termstatus 2025-09-15 20:25:17 +02:00
Michael Eischer 43b5166de8 terminal: cleanup determining width 2025-09-08 11:03:42 +02:00
Michael Eischer 93ccc548c8 termstatus: move cursor handling to terminal package 2025-09-08 11:03:17 +02:00
Michael Eischer 0ab38faa2e termstatus: track current status also in background
Without this, restic could temporarily print an outdated status when
moving back into the foreground.
2025-09-08 10:50:53 +02:00
Michael Eischer 48cbbf9651 ui/termstatus: extract background handling code 2025-09-08 10:50:09 +02:00