ci: Fix `fingerprint_script` for `depends` subdir caches #27070

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:230209-ci-deps changing 1 files +2 −2
  1. hebasto commented at 10:23 PM on February 9, 2023: member

    #26977 made current git rev-list -1 HEAD ./depends not working.

    This PR fixes this issue with an idea from #26977 (comment).

  2. ci: Fix `fingerprint_script` for `depends` subdir caches d66efa30cd
  3. DrahtBot commented at 10:24 PM on February 9, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK MarcoFalke

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Feb 9, 2023
  5. maflcko commented at 8:35 AM on February 10, 2023: member

    lgtm ACK d66efa30cdd84a11348fd6a3a9f0b3f89a5345ff

  6. maflcko merged this on Feb 10, 2023
  7. maflcko closed this on Feb 10, 2023

  8. hebasto deleted the branch on Feb 10, 2023
  9. real-or-random commented at 8:48 AM on February 10, 2023: contributor

    Just checking if I get this right: git rev-parse HEAD:foo uses the contents of foo as fingerprint (instead of the revision in which it was touched last)?

  10. maflcko commented at 9:13 AM on February 10, 2023: member

    Yeah, it is probably even more correct, as it doesn't commit to irrelevant stuff such as the commit message. So the fingerprint hash will be different, however, the important part is that the output should commit to the content of the depends system.

    git log -1 ./depends, git rev-list -1 HEAD ./depends, git rev-parse HEAD:depends, and git ls-tree HEAD ./depends should all have this property.

  11. hebasto commented at 10:35 AM on February 10, 2023: member

    Yeah, it is probably even more correct, as it doesn't commit to irrelevant stuff such as the commit message. So the fingerprint hash will be different, however, the important part is that the output should commit to the content of the depends system.

    git log -1 ./depends, git rev-list -1 HEAD ./depends, git rev-parse HEAD:depends, and git ls-tree HEAD ./depends should all have this property.

    A shallow repo, which is used in the CI, lacks details. Therefore, only git rev-parse HEAD:depends and git ls-tree HEAD ./depends are suitable as they return the same output for both deep and shallow repos.

  12. sidhujag referenced this in commit d7b9042f3e on Feb 10, 2023
  13. bitcoin locked this on Feb 10, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me