git rev-list $merges_option --pretty=oneline --reverse --left-right --topo-order \
$revisions ${restrict_revision+^$restrict_revision} | \
sed -n "s/^>//p" |
while read -r sha1 rest
do
if test -z "$keep_empty" && is_empty_commit $sha1 && ! is_merge_commit $sha1
then
comment_out="$comment_char "
else
comment_out=
fi
< p > 根据您在命令行上提供的 --keep-empty
(或-k
)标志设置变量$keep_empty
,因此如果没有这个标志,非空非合并提交会出现为# pick ...
。
(“空”提交是指源树与其父级相同的提交。)