Emacs:为什么要使用shell命令“ git log”可以,但是“ git shortlog”不是吗 [英] Emacs: why shell-command "git log" works, but "git shortlog" doesn't?

查看:88
本文介绍了Emacs:为什么要使用shell命令“ git log”可以,但是“ git shortlog”不是吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这一点。为什么它们的行为会有所不同:

I can't figure this out. Why do these behave differently:

(shell-command "git log")
(shell-command "git shortlog")

第一个按预期方式工作:返回0并将内容打印到shell输出缓冲区。
第二个返回0,但不输出任何内容。为什么?

First one works as expected: returns 0 and prints stuff to shell output buffer. Second one returns 0 but prints nothing. Why is that?


  1. 两者都 git log git shortlog ansi-term
  2. $ b $中可以完美地工作b
  3. git log git shortlog 均发出警告,但仍可在 shell中使用

  1. both git log and git shortlog work perfectly in ansi-term
  2. both git log and git shortlog give a warning but still work in shell


推荐答案

man git-shortlog


如果在命令行上未通过任何修订,并且标准
都不是终端或没有
当前分支,git shortlog将输出从标准输入读取的日志的摘要,而不参考当前存储库中的

If no revisions are passed on the command line and either standard input is not a terminal or there is no current branch, git shortlog will output a summary of the log read from standard input, without reference to the current repository.

您必须明确提供对您的情况的参考,

You must explicitly provide reference to work in your case,

使用, git shortlog HEAD

这篇关于Emacs:为什么要使用shell命令“ git log”可以,但是“ git shortlog”不是吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆