Bug 282901 - find(1): ls(1) equivalent for "-ls" is wrong
Summary: find(1): ls(1) equivalent for "-ls" is wrong
Status: In Progress
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Baldwin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-21 23:19 UTC by Thomas Eberhardt
Modified: 2024-11-23 16:57 UTC (History)
4 users (show)

See Also:


Attachments
Patch for find(1) man-page, correcting "-ls" description (549 bytes, patch)
2024-11-21 23:19 UTC, Thomas Eberhardt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Eberhardt 2024-11-21 23:19:02 UTC
Created attachment 255370 [details]
Patch for find(1) man-page, correcting "-ls" description

After https://cgit.FreeBSD.org/src/commit/?id=3bfbb521fef5764ecabc2bf3fdc76f47258171f8 the function of "-g" in ls(1) changed, which makes the description of "-ls" in find(1) wrong.

(How do I properly link to a git commit? "Quick Editing Help" mentions only SVN. Also the "Preview" button produces an empty text box for me (using Google Chrome).)
Comment 1 Alexander Ziaee freebsd_triage 2024-11-22 14:58:47 UTC
Nice find! The correct way to link the commit is to add a trailer to the commit message saying `Fixes: <tab> {first 8 or so characters of the commit hash} (something about the commit so it can be searched in the distant future when 8 characters becomes ambiguous)`.

One possible example commit message:
```
find.1: update manual for -ls to match logic

Fixes:      	3bfbb521(Improve POSIX compatibility for -g and -n)
```
Comment 2 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-11-22 15:21:43 UTC
I believe they were asking how to link to a commit message in a Bugzilla comment, and the answer is to prefix the hash with either “base”, “doc”, or “ports”, for instance: base 3bfbb521fef5
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-23 16:56:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=b4ede68c21c6c0277bc283c2bda35f3136e836b6

commit b4ede68c21c6c0277bc283c2bda35f3136e836b6
Author:     Thomas Eberhardt <sneakywumpus@gmail.com>
AuthorDate: 2024-11-23 16:45:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-11-23 16:45:27 +0000

    find: Correct ls(1) equivalent command for -ls primary

    After commit 3bfbb521fef5, -g stopped being a no-op.  The -g hasn't
    been required for equivalent output since 4.4BSD.

    PR:             282901
    Fixes:          3bfbb521 ls: Improve POSIX compatibility for -g and -n.

 usr.bin/find/find.1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 4 John Baldwin freebsd_committer freebsd_triage 2024-11-23 16:57:43 UTC
Thanks for the find.  I've pushed to main and will merge to 13 and 14 in a few days.