github api to compare commits, response status is diverged

笑着哭i 提交于 2019-12-06 06:32:11

This isn't documented (sorry!), but status can be one of four things:

  • "diverged" = commits were introduced on both the head and base branch since the common ancestor
  • "ahead" = commits were introduced on head after the common ancestor with base
  • "behind" = commits were introduced on base after the common ancestor with head
  • "identical" = branches point to same commit

So, "diverged" doesn't tell you whether a merge between the branches would result in merge conflicts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!