在DARC中,在两个补丁之间查看差异



在git中,我可以通过运行类似:

来查看两个提交之间的差异
$ git diff c23a45 ffd644

我该如何在darcs中执行此操作?

以下我尝试过的用户手册第5.10.1节:

$ darcs diff --from-patch ffd644 --to-patch c23a45

但这给出了错误:

darcs: Couldn't find patch matching "patch-name ffd644"
CallStack (from HasCallStack):
  error, called at src/Darcs/Patch/Match.hs:654:43 in darcs-2.12.4-EYDQyfVEyiPHocMCwLEEKg:Darcs.Patch.Match

使用完整的补丁哈希时,我会遇到类似的错误。

用他们的哈希参考补丁,使用 --from-hash--to-hash

darcs diff --from-hash ffd644 --to-hash c23a45

您也可以使用更多的详细match语法:

darcs diff --from-match 'hash ffd644' --to-match 'hash c23a45'

请注意,这是一个包容性选择:您会看到一个差异,其中包含您指定的两个和包括两个之间的补丁。

包含的补丁集也将取决于当前补丁在您的存储库中的顺序。如果重新排序补丁,例如使用darcs optimize reorder或将它们拉入其他存储库,然后您可能会看到其他差异。

最新更新