Add interactive snapshot comparison, CLI tests and treegen
--compare opens the TUI with growth/shrink colouring unless a report is requested. treegen builds deterministic synthetic trees (Unicode, hostile names, sparse files). MAPSIZE_DEBUG_PANIC verifies terminal restoration on UI and scanner panics.
This commit is contained in:
+6
-5
@@ -93,6 +93,12 @@ func runReport(cfg *Config) error {
|
||||
if s != nil {
|
||||
waitWithProgress(s, cfg.Stderr)
|
||||
}
|
||||
if cfg.Duplicates && !cfg.JSON && !cfg.CSV {
|
||||
// Find takes its own read lock; never nest RLock.
|
||||
if err := runDuplicates(ctx, cfg, t); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
if s != nil && cfg.Save != "" {
|
||||
@@ -108,11 +114,6 @@ func runReport(cfg *Config) error {
|
||||
case cfg.CSV:
|
||||
return export.CSV(out, t, t.Root(), cfg.Depth)
|
||||
}
|
||||
if cfg.Duplicates {
|
||||
if err := runDuplicates(ctx, cfg, t); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if cfg.Top > 0 {
|
||||
ids := t.SortedChildren(t.Root(), cfg.SizeMode)
|
||||
if len(ids) > cfg.Top {
|
||||
|
||||
Reference in New Issue
Block a user