哪个版本的 X 引入了特性 Y?

l0b*_*0b0 10 coreutils

A big part of my daily job is developing software for use on machines with different versions of the same software, like bash, find, and grep. When encountering a feature which would be useful for example to simplify code, it is important to know whether this feature is available in the oldest installed tools. For critical stuff, it would also be useful to know whether this feature was new or has existed for years in the oldest installed tools.

What are quick ways to answer this authoritatively for Linux tools, especially the GNU Core Utils? Some possibilities in order of decreasing accuracy:

  • Binary binary search (sic) by running the different versions is of course the ultimate answer, but is by far the most time consuming. Older installations are often not available for security reasons.
  • Reading the code is almost as good, but it can be prohibitively time consuming if the feature is vaguely named, the name doesn't correspond directly to variable/function/object names, or it was implemented before it was enabled.
  • Change logs, when available, usually connect feature changes to software versions.
  • Commit logs can provide hints, but do not know which version they will be included in.
  • man pages rarely mention dates.
  • 这同样适用于谷歌搜索,你也很难排除所有非权威来源。

mat*_*tdm 7

通常,有一个变更日志。事实上,这是 GPL 要求的(或其他“重要的更改通知”)!(至少,对于有多个贡献者的任何东西都是有效的 - 请参阅 GPLv2 第 2a 节。)

对于 GNU coreutils 包——以及直接来自 GNU 项目的几乎所有其他内容——这个文件绝对是第一个查看的地方,并且应该在 95% 的情况下回答你的问题。

  • 这是证据:http://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING 滚动到第 131 行。 (3认同)
  • GNU Coreutils ChangeLog 自 2007 年以来一直没有更新。 http://cvs.savannah.gnu.org/viewvc/coreutils/ChangeLog?root=coreutils&view=markup 你现在必须查看 git 日志。 (2认同)
  • 它可能是从 git 日志自动生成的。我的 Fedora 系统的 `/usr/share/doc/coreutils-8.10` 中有一个 `ChangeLog.bz2`,最上面的条目来自 `2011-02-04`。这也可能是一个 RH 分支——我今天晚些时候会检查一下。 (2认同)