]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: treat --time=mtime consistently with other time selectors
authorPádraig Brady <P@draigBrady.com>
Thu, 27 Jun 2024 17:15:02 +0000 (18:15 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 27 Jun 2024 17:37:23 +0000 (18:37 +0100)
commitb95c6ac7d20084d9167bdb9d759bcebcb0c2b766
treeb1352e6743d99d6042a85bb6339d78fd2874d20a
parent72588b291594c762133090ef24fcad8894fc91f6
ls: treat --time=mtime consistently with other time selectors

* src/ls.c: Track if --time=mtime is explicitly specified,
so that we can apply the GNU extension of sorting by the
specified time, when not displaying (-l not specified),
and not explicitly sorting (-t not specified).
* tests/ls/ls-time.sh: Add / Update test cases.
Fixes https://bugs.gnu.org/71803
src/ls.c
tests/ls/ls-time.sh