我试图比较两个存储库(一个是另一个的分支),官方方式,使用compare
并返回到2017-02-11:
https://github.com/bitcoin/bitcoin/compare/master@{2017-02-11}...UnitedBitcoin:master@{2017-02-11}
哪个回报:
There isn’t anything to compare.
但是当我使用Github GraphQL检索来自两个存储库的所有提交,然后测量交集时,我得到218个提交,它们共享相同的sha
。我在查询下面用来从一个repo中检索提交:
{
repository(owner: "bitcoin", name: "bitcoin") {
defaultBranchRef {
target {
... on Commit {
history(first: 100, since: "2017-02-11T00:00:00Z") {
totalCount
edges {
node {
committedDate
oid
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
}
}
}
}
怎么解释这个?为什么两种结果都不同?
仅供参考:“测量交叉点”是指我比较两个存储库中每个提交的ID(sha
)。
两个分支上的日期应该定义一个时间段,如“Comparing commits across time”中所述。
但在您的情况下,确切的错误消息是:
There isn’t anything to compare.
We couldn’t figure out how to compare these references, do they point to valid commits?
这似乎表明在2017-02-11中不存在fork。 如果你比较fork against the original repo,最古老的“分叉”提交是从2017年12月开始。 在此日期,fork上没有有效的提交(即特定于fork)。
介于(自:“2017-02-11T00:00:00Z”)和fork的开头(2017年12月初)之后,您可能仍会发现268个常见提交(因为fork仅在一个月后开始)