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
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
greatroar
1ed93bd54d
backend,termstatus: Unify foreground/background detection
...
PR #5358 reintroduced a version of the TIOCGPGRP ioctl call that works
on all Unix platforms except Linux, due to a bug/inconsistency in
x/sys/unix. This commit fixes that by introducing termstatus.Tcgetpgrp.
It also introduces termstatus.Getpgrp and termstatus.Tcsetpgrp to deal
with the different signature of unix.Getpgrp in Solaris vs. all other
Unix platforms and an int-overflowing constant on AIX, so that some
AIX/Solaris-specific code can be removed elsewhere and
foreground/background detection is done the same everywhere except on
Windows.
2025-09-08 09:33:44 +02:00
Michael Eischer
66a8e897a9
Merge pull request #5300 from MichaelEischer/fix-output-race
...
ui/termstatus: fix race condition in StdioWrapper
2025-03-24 11:17:14 +01:00
Michael Eischer
ec19d67512
ui/termstatus: fix race condition in StdioWrapper
2025-03-24 11:07:15 +01:00
Michael Eischer
f7f48b3026
ui/progress: extend Printer interface with print to stdout method
2025-03-23 17:46:04 +01:00
Martin Smith
f238f81ba6
Renames to fix clashes with reserved words.
2025-03-22 18:20:30 +00:00
Martin Smith
3788605127
Rename unused parameters to '_'.
2025-03-22 18:20:30 +00:00
Martin Smith
092899df8b
Remove unnecessary type conversions.
2025-03-22 18:20:30 +00:00
Martin Smith
1daf5317f8
Fix import ordering.
2025-03-22 18:20:30 +00:00
greatroar
c1781e0abb
ui/termstatus: Remove unused bytes.Buffer
2025-02-01 08:21:40 +01:00