douluokuang7184 2018-04-09 10:44
浏览 92
已采纳

是否可以将git diff与go-git等效

I'm pulling a repo every 10 seconds and need to check what files have changed after each pull.

Is it possible to do this with go-git?

  • 写回答

1条回答 默认 最新

  • douying2243 2018-04-09 13:13
    关注

    You can use the (*object.Commit).Patch method to diff two arbitrary commits. This provides information about which files where changed and what the differences were.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?