git 发生了什么变化 - -M 有什么作用?

git whatchanged - what does -M do?

我正在查看一些使用传递给 Git 的 -M(大写 M,而不是小写,记录为包含合并)标志的代码发生了什么变化。

我在手册页(对于 1.8.3.1)中看不到标志的定义。谁能建议它的作用?是-m(小写)的反义词吗?

文档是 git 日志。 git whatchanged 已弃用。请改用 git 日志。

-M --find-renames[=]

If generating diffs, detect and report renames for each commit.

For following files across renames while traversing history, see --follow.

If n is specified, it is a threshold on the similarity index (i.e. amount of addition/deletions compared to the file’s size). For example, -M90% means Git should consider a delete/add pair to be a rename if more than 90% of the file hasn’t changed. Without a % sign, the number is to be read as a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus the same as -M50%. Similarly, -M05 is the same as -M5%. To limit detection to exact renames, use -M100%.

The default similarity index is 50%.