Page MenuHomeFreeBSD

fts: Correct description of fts_set
ClosedPublic

Authored by des on Fri, May 29, 2:07 PM.
Tags
None
Referenced Files
F159189340: D57326.diff
Thu, Jun 11, 2:57 AM
F159186859: D57326.id.diff
Thu, Jun 11, 2:13 AM
Unknown Object (File)
Mon, Jun 8, 11:37 PM
Unknown Object (File)
Sun, Jun 7, 5:05 AM
Unknown Object (File)
Sun, Jun 7, 5:02 AM
Unknown Object (File)
Sat, Jun 6, 5:13 PM
Unknown Object (File)
Sat, Jun 6, 7:08 AM
Unknown Object (File)
Sat, Jun 6, 5:52 AM
Subscribers

Details

Summary

Reverts: e030e4e73fe7 ("lib/libc/gen/fts.3: use 'options' consistently in fts_set() description")
MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Fri, May 29, 2:07 PM

Why?

options was never correct, it has always been instr. I assume whoever first wrote the page copy-pasted fts_children() and forgot to adjust options to instr.

Crucially, functions that take an options argument accept multiple value bitwise-or'ed together, while fts_set() accepts only one value at a time.

In D57326#1313547, @des wrote:

Why?

options was never correct, it has always been instr. I assume whoever first wrote the page copy-pasted fts_children() and forgot to adjust options to instr.

Crucially, functions that take an options argument accept multiple value bitwise-or'ed together, while fts_set() accepts only one value at a time.

The prototype at the top of the man page documents the argument as being named "options". And the header file does not contradict that. So "options" is definitely the name of the argument, and change e030e4e73fe7 was correct. Whether it _should_ be named that is a different question. I would not describe this change of yours as a reversion.

In D57326#1313547, @des wrote:

Why?

options was never correct, it has always been instr. I assume whoever first wrote the page copy-pasted fts_children() and forgot to adjust options to instr.

Crucially, functions that take an options argument accept multiple value bitwise-or'ed together, while fts_set() accepts only one value at a time.

The prototype at the top of the man page documents the argument as being named "options". And the header file does not contradict that. So "options" is definitely the name of the argument, and change e030e4e73fe7 was correct. Whether it _should_ be named that is a different question. I would not describe this change of yours as a reversion.

I just explained to you that the prototype at the top of the page is incorrect. The header does not name the argument. The code names the argument instr and always has; options was never a reasonable name for this argument.

In D57326#1313561, @des wrote:
In D57326#1313547, @des wrote:

Why?

options was never correct, it has always been instr. I assume whoever first wrote the page copy-pasted fts_children() and forgot to adjust options to instr.

Crucially, functions that take an options argument accept multiple value bitwise-or'ed together, while fts_set() accepts only one value at a time.

The prototype at the top of the man page documents the argument as being named "options". And the header file does not contradict that. So "options" is definitely the name of the argument, and change e030e4e73fe7 was correct. Whether it _should_ be named that is a different question. I would not describe this change of yours as a reversion.

I just explained to you that the prototype at the top of the page is incorrect. The header does not name the argument. The code names the argument instr and always has; options was never a reasonable name for this argument.

The code doesn't matter; that's an implementation detail not visible to the user. The only user-visible name ever given for that argument was "options", in the prototype at the top of the man page. That prototype defined the argument name. So it was by definition correct.
Of course, that doesn't mean that it was a wisely-chosen name. Changing argument names is something we can do. But "changing the argument's name" it different than "revert the change that made the argument name consistent". This PR has a misleading commit message.

This revision was not accepted when it landed; it landed in state Needs Review.Fri, Jun 5, 4:47 PM
This revision was automatically updated to reflect the committed changes.