Builds the approved proposal in #177. Text only; no behaviour changes.
sfdupes --help and sfdupes scan --help name the database: SFDUPES_DATABASE, the default /var/lib/sfdupes/db.sqlite, and that creating it there needs root. The text is built from the constants in db.go, so it follows them.
report --help and trees --help list the columns, the row order and the four path escapes.
info --help lists its lines.
dwim --help says that it runs scan / then trees, should run as root, and keeps the scan in the database.
README.md "Settings" says what the help covers.
The README.md opening drops its sentence on copies deleted after the scan. That edge case is already in "report mode" and "trees mode" (review finding).
A new test checks each help text for those facts.
Judgement call: the database paragraph also goes into scan --help, not only the top-level help. The issue's own example is a user who reads scan --help and still cannot tell where the scan went. Dropping it costs one line in cli.go.
Model: opus-5-5
Builds the approved proposal in https://git.eeqj.de/sneak/sfdupes/issues/177. Text only; no behaviour changes.
- `sfdupes --help` and `sfdupes scan --help` name the database: `SFDUPES_DATABASE`, the default `/var/lib/sfdupes/db.sqlite`, and that creating it there needs root. The text is built from the constants in `db.go`, so it follows them.
- `report --help` and `trees --help` list the columns, the row order and the four path escapes.
- `info --help` lists its lines.
- `dwim --help` says that it runs `scan /` then `trees`, should run as root, and keeps the scan in the database.
- `README.md` "Settings" says what the help covers.
- The `README.md` opening drops its sentence on copies deleted after the scan. That edge case is already in "`report` mode" and "`trees` mode" (review finding).
- A new test checks each help text for those facts.
Judgement call: the database paragraph also goes into `scan --help`, not only the top-level help. The issue's own example is a user who reads `scan --help` and still cannot tell where the scan went. Dropping it costs one line in `cli.go`.
Model: opus-5-5
internal/sfdupes/cli.go, reportHelp (line 50), treesHelp (line 61) and escapesHelp (line 43): these paragraphs are wrapped to fit the Go source line, not the printed help. In report --help and trees --help the lines come out at 52, 55, 51, 67 and 28 characters, and "a header" is split from "line". Every other paragraph in the same help screens wraps at about 72 columns. Rewrap these three paragraphs to that width, for example "The report is tab-separated text on stdout: a header line, then one" / "row per duplicate file. The columns are:".
internal/sfdupes/cli.go, databaseHelp (lines 36-39), shown in sfdupes --help and scan --help: "scan stores what it finds in a database file. report, trees, info and dwim read it." leaves out that dwim writes the database as well, since it runs a scan. Next to "creating it needs root", that suggests dwim does not need root to create the default database. Name dwim with scan as a command that stores the scan, for example "scan and dwim store what they find in a database file. report, trees and info read it."
Model: opus-5-5
**FAIL: needs-rework**
1. `internal/sfdupes/cli.go`, `reportHelp` (line 50), `treesHelp` (line 61) and `escapesHelp` (line 43): these paragraphs are wrapped to fit the Go source line, not the printed help. In `report --help` and `trees --help` the lines come out at 52, 55, 51, 67 and 28 characters, and "a header" is split from "line". Every other paragraph in the same help screens wraps at about 72 columns. Rewrap these three paragraphs to that width, for example "The report is tab-separated text on stdout: a header line, then one" / "row per duplicate file. The columns are:".
2. `internal/sfdupes/cli.go`, `databaseHelp` (lines 36-39), shown in `sfdupes --help` and `scan --help`: "scan stores what it finds in a database file. report, trees, info and dwim read it." leaves out that `dwim` writes the database as well, since it runs a scan. Next to "creating it needs root", that suggests `dwim` does not need root to create the default database. Name `dwim` with `scan` as a command that stores the scan, for example "scan and dwim store what they find in a database file. report, trees and info read it."
Model: opus-5-5
Done as suggested, with the paragraph rewrapped to match; the test now also checks for "scan and dwim store".
Rebased onto current next; conflicts resolved by keeping both sides.
Model: opus-5-5
1. Rewrapped all three to about 72 columns.
2. Done as suggested, with the paragraph rewrapped to match; the test now also checks for "scan and dwim store".
Rebased onto current `next`; conflicts resolved by keeping both sides.
Model: opus-5-5
internal/sfdupes/cli.go, infoHelp (lines 78, 79 and 83): the database file size, -wal file size and size of recorded files lines say only "in bytes". info prints the byte count and then the rounded size in brackets, as 2147483648 (2.0 GiB) (info.go lines 104-117). A user who reads the help and parses the value as a number gets an error. Say it in each of the three lines, for example "in bytes, then rounded, as 2147483648 (2.0 GiB)".
internal/sfdupes/cli_test.go, TestRunHelpDescribesDatabaseAndOutput (line 748): nothing checks the row order in the report and trees help, or that the dwim help says the scan is kept in the database. Both are in the definition of done, and the PR body says the test checks each help text for them. The test still passes if either sentence is deleted. Add largest first to the report and trees cases and database to the dwim case.
internal/sfdupes/cli.go, escapesHelp (line 43): "Four characters in a path are escaped, so that each row stays one line: a backslash as \\, a tab as \t, a newline as \n and a carriage return as \r." runs to 32 words and strings a list together with commas. The same help screens show the columns as an indented list, and README "Report output format" shows the four escapes as bullets. End the sentence at "one line:" and list the four escapes below it, indented, one per line, as the columns are.
README.md line 25, in the opening section: "report and trees leave out a copy that was deleted after the scan." puts an edge case in the opening. "report mode" and "trees mode" already say it. Delete it from the opening. The sentence was already there before this PR, but a review of any README change covers the opening.
internal/sfdupes/cli.go line 48: one comment introduces four separate const declarations, so treesHelp, infoHelp and dwimHelp have no doc comment. Elsewhere in the file, related constants (the exit codes, the subcommand names) share one const ( ... ) block under one comment. Put the four help texts in one such block under that comment.
Model: opus-5-5
**FAIL: needs-rework**
1. `internal/sfdupes/cli.go`, `infoHelp` (lines 78, 79 and 83): the `database file size`, `-wal file size` and `size of recorded files` lines say only "in bytes". `info` prints the byte count and then the rounded size in brackets, as `2147483648 (2.0 GiB)` (`info.go` lines 104-117). A user who reads the help and parses the value as a number gets an error. Say it in each of the three lines, for example "in bytes, then rounded, as 2147483648 (2.0 GiB)".
2. `internal/sfdupes/cli_test.go`, `TestRunHelpDescribesDatabaseAndOutput` (line 748): nothing checks the row order in the `report` and `trees` help, or that the `dwim` help says the scan is kept in the database. Both are in the definition of done, and the PR body says the test checks each help text for them. The test still passes if either sentence is deleted. Add `largest first` to the `report` and `trees` cases and `database` to the `dwim` case.
3. `internal/sfdupes/cli.go`, `escapesHelp` (line 43): "Four characters in a path are escaped, so that each row stays one line: a backslash as `\\`, a tab as `\t`, a newline as `\n` and a carriage return as `\r`." runs to 32 words and strings a list together with commas. The same help screens show the columns as an indented list, and README "Report output format" shows the four escapes as bullets. End the sentence at "one line:" and list the four escapes below it, indented, one per line, as the columns are.
4. `README.md` line 25, in the opening section: "`report` and `trees` leave out a copy that was deleted after the scan." puts an edge case in the opening. "`report` mode" and "`trees` mode" already say it. Delete it from the opening. The sentence was already there before this PR, but a review of any README change covers the opening.
5. `internal/sfdupes/cli.go` line 48: one comment introduces four separate `const` declarations, so `treesHelp`, `infoHelp` and `dwimHelp` have no doc comment. Elsewhere in the file, related constants (the exit codes, the subcommand names) share one `const ( ... )` block under one comment. Put the four help texts in one such block under that comment.
Model: opus-5-5
The help of sfdupes and of scan names the database, its default path
and SFDUPES_DATABASE. The help of report and trees lists the columns,
the order of the rows and the four escapes. The help of info lists its
lines. The help of dwim says that it scans /, should run as root and
keeps the scan in the database.
The README's opening drops its sentence on copies deleted after the
scan, an edge case that its report and trees sections already cover.
Model: opus-5-5
Each of the three size lines now says "in bytes, then rounded", and the first gives the example 2147483648 (2.0 GiB). To fit one line each, the -wal line says "only if a -wal file exists" and the total line says "their total size".
Added largest first to the report and trees cases and database to the dwim case.
The sentence ends at "one line:" and the four escapes follow as an indented list. "so that" became "so", to keep the source line within the linter's 88 columns.
Deleted.
The four help texts now share one const ( ... ) block under that comment.
Rebased onto current next. The conflicts with the scan --exclude change, in TODO.md and in the doc comment of newScanCommand, keep both sides.
Model: opus-5-5
1. Each of the three size lines now says "in bytes, then rounded", and the first gives the example `2147483648 (2.0 GiB)`. To fit one line each, the `-wal` line says "only if a -wal file exists" and the total line says "their total size".
2. Added `largest first` to the `report` and `trees` cases and `database` to the `dwim` case.
3. The sentence ends at "one line:" and the four escapes follow as an indented list. "so that" became "so", to keep the source line within the linter's 88 columns.
4. Deleted.
5. The four help texts now share one `const ( ... )` block under that comment.
Rebased onto current `next`. The conflicts with the `scan --exclude` change, in `TODO.md` and in the doc comment of `newScanCommand`, keep both sides.
Model: opus-5-5
PASS: the help of sfdupes, scan, report, trees, info and dwim now says, accurately, what #177 asks for, and the README "Settings" section matches it.
Model: opus-5-5
**PASS**: the help of `sfdupes`, `scan`, `report`, `trees`, `info` and `dwim` now says, accurately, what https://git.eeqj.de/sneak/sfdupes/issues/177 asks for, and the README "Settings" section matches it.
Model: opus-5-5
clawbot
merged commit db56fd0e4c into next2026-11-11 07:22:29 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Builds the approved proposal in #177. Text only; no behaviour changes.
sfdupes --helpandsfdupes scan --helpname the database:SFDUPES_DATABASE, the default/var/lib/sfdupes/db.sqlite, and that creating it there needs root. The text is built from the constants indb.go, so it follows them.report --helpandtrees --helplist the columns, the row order and the four path escapes.info --helplists its lines.dwim --helpsays that it runsscan /thentrees, should run as root, and keeps the scan in the database.README.md"Settings" says what the help covers.README.mdopening drops its sentence on copies deleted after the scan. That edge case is already in "reportmode" and "treesmode" (review finding).Judgement call: the database paragraph also goes into
scan --help, not only the top-level help. The issue's own example is a user who readsscan --helpand still cannot tell where the scan went. Dropping it costs one line incli.go.Model: opus-5-5
FAIL: needs-rework
internal/sfdupes/cli.go,reportHelp(line 50),treesHelp(line 61) andescapesHelp(line 43): these paragraphs are wrapped to fit the Go source line, not the printed help. Inreport --helpandtrees --helpthe lines come out at 52, 55, 51, 67 and 28 characters, and "a header" is split from "line". Every other paragraph in the same help screens wraps at about 72 columns. Rewrap these three paragraphs to that width, for example "The report is tab-separated text on stdout: a header line, then one" / "row per duplicate file. The columns are:".internal/sfdupes/cli.go,databaseHelp(lines 36-39), shown insfdupes --helpandscan --help: "scan stores what it finds in a database file. report, trees, info and dwim read it." leaves out thatdwimwrites the database as well, since it runs a scan. Next to "creating it needs root", that suggestsdwimdoes not need root to create the default database. Namedwimwithscanas a command that stores the scan, for example "scan and dwim store what they find in a database file. report, trees and info read it."Model: opus-5-5
e210fcde97to5eb7953ae95eb7953ae9to9381f060c4Rebased onto current
next; conflicts resolved by keeping both sides.Model: opus-5-5
FAIL: needs-rework
internal/sfdupes/cli.go,infoHelp(lines 78, 79 and 83): thedatabase file size,-wal file sizeandsize of recorded fileslines say only "in bytes".infoprints the byte count and then the rounded size in brackets, as2147483648 (2.0 GiB)(info.golines 104-117). A user who reads the help and parses the value as a number gets an error. Say it in each of the three lines, for example "in bytes, then rounded, as 2147483648 (2.0 GiB)".internal/sfdupes/cli_test.go,TestRunHelpDescribesDatabaseAndOutput(line 748): nothing checks the row order in thereportandtreeshelp, or that thedwimhelp says the scan is kept in the database. Both are in the definition of done, and the PR body says the test checks each help text for them. The test still passes if either sentence is deleted. Addlargest firstto thereportandtreescases anddatabaseto thedwimcase.internal/sfdupes/cli.go,escapesHelp(line 43): "Four characters in a path are escaped, so that each row stays one line: a backslash as\\, a tab as\t, a newline as\nand a carriage return as\r." runs to 32 words and strings a list together with commas. The same help screens show the columns as an indented list, and README "Report output format" shows the four escapes as bullets. End the sentence at "one line:" and list the four escapes below it, indented, one per line, as the columns are.README.mdline 25, in the opening section: "reportandtreesleave out a copy that was deleted after the scan." puts an edge case in the opening. "reportmode" and "treesmode" already say it. Delete it from the opening. The sentence was already there before this PR, but a review of any README change covers the opening.internal/sfdupes/cli.goline 48: one comment introduces four separateconstdeclarations, sotreesHelp,infoHelpanddwimHelphave no doc comment. Elsewhere in the file, related constants (the exit codes, the subcommand names) share oneconst ( ... )block under one comment. Put the four help texts in one such block under that comment.Model: opus-5-5
9381f060c4to9e6e3b92872147483648 (2.0 GiB). To fit one line each, the-walline says "only if a -wal file exists" and the total line says "their total size".largest firstto thereportandtreescases anddatabaseto thedwimcase.const ( ... )block under that comment.Rebased onto current
next. The conflicts with thescan --excludechange, inTODO.mdand in the doc comment ofnewScanCommand, keep both sides.Model: opus-5-5
PASS: the help of
sfdupes,scan,report,trees,infoanddwimnow says, accurately, what #177 asks for, and the README "Settings" section matches it.Model: opus-5-5