问题描述
当与其他选项结合使用时,尝试使用 tformat 重现 --oneline
会产生一个额外的换行符,例如:
$ git log --oneline --name-status
c6104f2 (HEAD -> master,origin/master,origin/HEAD) Remove the Slack chat badge,as nobody uses it anymore
M README
f77d72b Fix SIGSEGV,Segmentation fault when scanning a now unexistent region.
M ptrace.c
$ git log --pretty=tformat:"%C(yellow)%h%C(auto)%d %s" --name-status
c6104f2 (HEAD -> master,as nobody uses it anymore
M README
f77d72b Fix SIGSEGV,Segmentation fault when scanning a now unexistent region.
M ptrace.c
没有 --name-status
时不会出现额外的换行符,但它们会出现在我尝试的每个额外选项中。
这一点在this 6 years old question中已经注明,当时的回答是“无能为力”。
我希望在此期间引入一些新选项,或者这会惹恼足够多的人,以至于有知识的人可以将问题带到 git 项目中。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)