abo*_*abo 9 git emacs shell elisp
我无法弄清楚这一点.为什么这些行为有所不同:
(shell-command "git log")
(shell-command "git shortlog")
Run Code Online (Sandbox Code Playgroud)
第一个按预期工作:返回0并将东西打印到shell输出缓冲区.第二个返回0但不打印任何内容.这是为什么?
也
git log并git shortlog在完美地工作ansi-termgit log并git shortlog发出警告但仍然有效shellman git-shortlog
如果没有在命令行上传递任何修订,并且标准输入不是终端或没有当前分支,则git shortlog将输出从标准输入读取的日志的摘要,而不会引用当前存储库。
您必须明确提供参考,以适合您的情况,
使用git shortlog HEAD代替。