Bug 282901

Summary: find(1): ls(1) equivalent for "-ls" is wrong
Product: Documentation Reporter: Thomas Eberhardt <sneakywumpus>
Component: Manual PagesAssignee: John Baldwin <jhb>
Status: Closed FIXED    
Severity: Affects Only Me CC: des, doc, jhb, ziaee
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for find(1) man-page, correcting "-ls" description none

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.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-12-01 04:57:49 UTC
A commit in branch stable/14 references this bug:

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

commit 4ec46a286b26901d5ee9ac3b405faaa36867e8a1
Author:     Thomas Eberhardt <sneakywumpus@gmail.com>
AuthorDate: 2024-11-23 16:45:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-12-01 02:46:08 +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.

    (cherry picked from commit b4ede68c21c6c0277bc283c2bda35f3136e836b6)

 usr.bin/find/find.1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-12-01 04:58:52 UTC
A commit in branch stable/13 references this bug:

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

commit ac8517f04c0fe31968ed43e36608ad02d72d3597
Author:     Thomas Eberhardt <sneakywumpus@gmail.com>
AuthorDate: 2024-11-23 16:45:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-11-30 21:54:18 +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.

    The ls(1) change hasn't been merged to stable/13, but the -g is still
    a no-op on stable/13 so the updated docs here are still correct and
    more future-proof.

    (cherry picked from commit b4ede68c21c6c0277bc283c2bda35f3136e836b6)

 usr.bin/find/find.1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)