-
Notifications
You must be signed in to change notification settings - Fork 141
Fix example and language in manpage #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/rmlint.1.rst
Outdated
This command makes ``rmlint`` exit with one of the following exit codes: | ||
|
||
* 0: files are reflinks | ||
* 1: files are not reflinks | ||
* 3: not a regular file | ||
* 4: file sizes differ | ||
* 5: fiemaps can't be read | ||
* 6: file1 and file2 are the same path | ||
* 6: file1 and file2 are at the same path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change. This status is for when the two paths provided are literally the same path after resolving symlinks, hence no data needs to be looked at. Maybe we could say "have the same path", but I'd have to think about it - technically, no two files can have the same path, because that would mean they're the same file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "path1" and "path2" are more suitable argument names. Then this could read:
6: path1 and path2 point to the same file (after resolving symlinks)
Come to think of it, this sounds reasonable as well:
6: file1 and file2 are the same (after resolving symlinks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, "the same file" is ambiguous here, because it could be taken to mean "the same inode." But that's a hardlink - two different paths that point to the same file. The paths themselves are equal after resolving symlinks in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just explain more explicitly in the same way as we do in this discussion?
Like:
* 6: resolved absolute paths of file1 and file2 are identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find that still a bit confusing: what is the actual state it should explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file1 is file2 (same path) or
file1 is a symlink to file2 or
file2 is a symlink to file1 or
file1 and file2 are symlink to the same file3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But they are not symlink to each others ;)
vt@luga ~/dev/contrib/rmlint% ls -l b c
lrwxrwxrwx 1 vt vt 1 Mar 3 20:19 b -> c
lrwxrwxrwx 1 vt vt 1 Mar 3 20:19 c -> b
vt@luga ~/dev/contrib/rmlint% rmlint --is-reflink b c
ERROR: lib/utilities.c:1167: rm_util_link_type: Error opening /home/vt/dev/contrib/rmlint/c: Too many levels of symbolic links
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And status 9 (RM_LINK_SYMLINK) seems not possible to happen in that case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RayOei what do you think should be the right formulation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your suggestion is fine.
docs/rmlint.1.rst
Outdated
@@ -268,7 +268,7 @@ General Options | |||
|
|||
The letter may also be written uppercase (similar to ``-S / | |||
--rank-by``) to reverse the sorting. Note that ``rmlint`` has to hold | |||
back all results to the end of the run before sorting and printing. | |||
back all results till the end of the run before sorting and printing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a native speaker of English, but it seems to me that until sounds better than till in this sentence and the formal style of a manual page.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not native either. But from my understanding both are fine, albeit until
is a bit more formal and would therefore fit a bit better in manual, I think.
while ``apple.png`` and ``peach.png`` won't. The comparison is case-insensitive. | ||
|
||
:``-n --newer-than-stamp=<timestamp_filename>`` / ``-N --newer-than=<iso8601_timestamp_or_unix_timestamp>``: | ||
|
||
Only consider files (and their size siblings for duplicates) newer than a | ||
certain modification time (*mtime*). The age barrier may be given as | ||
seconds since the epoch or as ISO8601-Timestamp like | ||
seconds since the epoch or as an ISO8601 timestamp like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ISO 8601-formatted timestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or ISO 8601 formatted timestamp, whichever looks better to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 8601-formatted
is unnatural in English.
The more common phrasing would be a timestamp formatted according to ISO 8601
|
||
Available options: | ||
|
||
- *iso8601=[true|false]:* Write an ISO8601 formatted timestamps or seconds | ||
- *iso8601=[true|false]:* Write ISO8601-formatted timestamps or seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that answers my question above ;)
I feel like it would be more accurate with a space after ISO though. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above 😁
docs/rmlint.1.rst
Outdated
This command makes ``rmlint`` exit with one of the following exit codes: | ||
|
||
* 0: files are reflinks | ||
* 1: files are not reflinks | ||
* 3: not a regular file | ||
* 4: file sizes differ | ||
* 5: fiemaps can't be read | ||
* 6: file1 and file2 are the same path | ||
* 6: file1 and file2 are at the same path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just explain more explicitly in the same way as we do in this discussion?
Like:
* 6: resolved absolute paths of file1 and file2 are identical
docs/rmlint.1.rst
Outdated
The gui has its own set of options, see ``--gui --help`` for a list. These | ||
should be placed at the end, ie ``rmlint --gui [options]`` when calling | ||
it from commandline. | ||
The GUI has its own set of options, see ``--gui --help`` for a list. These |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why two spaces after dot ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, I presume?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, I presume?
Yeah, but in the original version there was only one, and the two spaces appeared multiple times over the document. So maybe I thought that was a formatting of some sort.
Hi and thanks a lot for rmlint!
I'd like to offer some improvements for the manpage.
It's mostly typo fixes and attempts to make the manpage easier to read.
But I think I also spotted an error in the examples. In the old version,
rmlint -e
was described asYet I'm pretty sure that option
-b
does that, whereas-e
makes rmlint consider two files as duplicates only if their extensions match.