【问题标题】:Iterate over commits by date按日期迭代提交
【发布时间】:2015-05-23 09:37:39
【问题描述】:

我正在尝试编写一个脚本来对 git 存储库进行一些代码覆盖率统计。但我只想每 6 个月对数据进行一次采样。有没有办法编写这样的脚本:

伪代码:

foreach (commit in all-commits)
    if(commit.date % 6months == 0)
        commit.checkout
        <run my unit test coverage here>

【问题讨论】:

    标签: macos git shell


    【解决方案1】:

    git 支持这个:

     git log --since=2.weeks.ago --until=2.days.ago
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-09
      • 1970-01-01
      • 2011-04-18
      • 1970-01-01
      • 1970-01-01
      • 2017-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多