问题 git show --onon not not on online


我正在使用mysysgit的1.8.3版本,似乎--oneline命令不会给我每次提交一行,我也得到所有的diff行。

git show HEAD --oneline

乃至 git show HEAD --pretty="%h %s"

不要只给一行。

(注意:同时使用git bash和posh git的结果)

我想要show --oneline的原因是我想把一个rev-list查询的结果从posh git中输入它。

git rev-list <somestuff> | %{git show $_ --oneline}

11817
2018-06-21 00:52


起源



答案:


可能

git log HEAD --oneline --no-walk

是你想要的。

顺便说一下,有 --pretty 和 --oneline 同样的 git log 在 git rev-list,也许管道是不必要的。


9
2018-06-21 01:36



很好。谢谢。 - Tim Jarvis
然而,答案并没有解释为什么 git show HEAD --oneline 不会产生文档中所述的输出: <sha1> <title line> This is designed to be as compact as possible. - Tim


答案:


可能

git log HEAD --oneline --no-walk

是你想要的。

顺便说一下,有 --pretty 和 --oneline 同样的 git log 在 git rev-list,也许管道是不必要的。


9
2018-06-21 01:36



很好。谢谢。 - Tim Jarvis
然而,答案并没有解释为什么 git show HEAD --oneline 不会产生文档中所述的输出: <sha1> <title line> This is designed to be as compact as possible. - Tim