<分区>
我有一个小的 bash 脚本:
echo "Total commits: "
git log --all --pretty=format:"%h %ad | %s%d [%an]" --date=short | wc -l
echo "Total no-merge commits: "
git log --all --pretty=format:"%h %ad | %s%d [%an]" --date=short --no-merges | wc -l
echo "Total merge commits: "
git log --all --pretty=format:"%h %ad | %s%d [%an]" --date=short --merges | wc -l
我知道代码不是最优的。 我的脚本的结果:
Total commits:
1000
Total no-merge commits:
817
Total merge commits:
182
问题:为什么非 merge 和 merge 提交的总和 (182+817 = 999) 低于总提交数 (1000)?