【问题标题】:How to get git-log to display commits using relative revision syntax of git-parse-rev如何使用 git-parse-rev 的相对修订语法让 git-log 显示提交
【发布时间】:2011-10-01 11:59:50
【问题描述】:

git show-branch 使用 git-parse-rev 可以解析的相对修订表达式显示提交,例如“dev~106^2~52”。如何从 git-log 获得相同的输出?

【问题讨论】:

标签: git git-log


【解决方案1】:

没有。

git log (git help log) 的文档描述了使用--pretty=tformat:... 自定义输出的方法,但不幸的是,git describe 样式的修订标识符没有占位符,也没有运行 shell 命令的占位符并使用它的输出。要么可以做你想做的事。也许您可以将它们推荐给 Git 开发人员。

【讨论】:

    【解决方案2】:

    Yes?: 类似git log | git name-rev --stdin,即参见git name-rev 手册页以获取此格式。

    我有一个类似的问题describe a commit relative to a tag in parent^/ancestor~ format 链接回这里 ;-)

    【讨论】:

      猜你喜欢
      • 2017-11-25
      • 2015-04-02
      • 1970-01-01
      • 2021-04-29
      • 2020-11-23
      • 1970-01-01
      • 2011-12-05
      • 2015-10-05
      • 2012-12-23
      相关资源
      最近更新 更多