Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
按提交消息中的行数筛选git提交_Git_Git Commit - Fatal编程技术网

按提交消息中的行数筛选git提交

按提交消息中的行数筛选git提交,git,git-commit,Git,Git Commit,我试图找到长(详细)git提交,它在消息正文中包含超过一定数量的行,比如说提交超过3行的消息(除了标题行) 有没有办法做到这一点 目标是在我们的代码库中展示清晰和描述性的提交消息,或者在开源存储库中找到长提交消息的好例子。如上所述,git log具有标志“-log size” # use the --log-size flag to view the size of the commit message # add the -online to make the output more comp

我试图找到长(详细)git提交,它在消息正文中包含超过一定数量的行,比如说提交超过3行的消息(除了标题行)

有没有办法做到这一点


目标是在我们的代码库中展示清晰和描述性的提交消息,或者在开源存储库中找到长提交消息的好例子。

如上所述,git log具有标志“-log size”

# use the --log-size flag to view the size of the commit message
# add the -online to make the output more compact
git log --log-size --oneline
--原木尺寸 在每次提交的输出中包括一行“log size”,其中是该提交消息的长度(以字节为单位)

旨在通过允许提前分配空间来加速从`git日志输出读取日志消息的工具


这远不是一个完整的答案,但我猜
--log size
,将是您解决方案的一部分
git log--log size
以字节为单位给出每个日志项的大小。奇怪的是,这个选项没有包括一些计算行数的方法。似乎解析日志消息中的
\n
字符本身是实现我所寻找的目标的一种更简单的方法。不