Skip unrelated files when using git archive #1287

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:230421-archive changing 1 files +5 −0
  1. hebasto commented at 10:07 pm on April 21, 2023: member

    An option for #1175:

    0$ git fetch origin pull/1287/head
    1$ git archive --output=libsecp256k1-PR1287.tar.gz FETCH_HEAD 
    2$ sha256sum libsecp256k1-PR1287.tar.gz 
    36e6fd21afd935e572b138258f782fed60bb11fa88aa51a9866f10cca5d25c39c  libsecp256k1-PR1287.tar.gz
    4$ git archive --output=libsecp256k1-PR1287.zip FETCH_HEAD 
    5$ sha256sum libsecp256k1-PR1287.zip 
    6e108fc4902502640eee2cf4bb69501a494904c4dcd0763c072cc4acaed565861  libsecp256k1-PR1287.zip
    
  2. Skip unrelated files when using `git archive` 3f483e4cfd
  3. hebasto cross-referenced this on Apr 21, 2023 from issue release: Release tarballs? How to sign releases? by real-or-random
  4. jonasnick commented at 8:21 am on April 23, 2023: contributor

    In what sense are these files unrelated? Is it worth maintaining a list of files in .gitattributes that are “unrelated”?

    Fwiw git archive is not deterministic:

    0❯ git fetch origin pull/1287/head && git archive --output=libsecp256k1-PR1287.tar.gz FETCH_HEAD && sha256sum libsecp256k1-PR1287.tar.gz
    1From github.com:bitcoin-core/secp256k1
    2 * branch              refs/pull/1287/head -> FETCH_HEAD
    35df771480968b3ff3df53c2808284e855912f037fa2c206b35205ae856e2aa52  libsecp256k1-PR1287.tar.gz
    4❯ git archive --output=libsecp256k1-PR1287.zip FETCH_HEAD  && sha256sum libsecp256k1-PR1287.zip
    57d7167119528c18710f8f5191e2a574405f016f17a7b520a970aca22afa8778e  libsecp256k1-PR1287.zip
    
  5. hebasto commented at 8:47 am on April 23, 2023: member

    In what sense are these files unrelated? Is it worth maintaining a list of files in .gitattributes that are “unrelated”?

    From #1175#issue-1492956877:

    It’s a bit silly to not include files like .gitignore and .cirrus.yml. I mean this is for devs of the library, you would want to have these files.

  6. hebasto commented at 9:53 am on April 23, 2023: member

    Fwiw git archive is not deterministic:

    Hmm, that’s unexpected (

    git archive uses the passed commit time as the modification time of each file in the archive. And gzip is deterministic as well.

    What is the source of non-determinism in your opinion?

  7. real-or-random commented at 7:01 am on April 24, 2023: contributor

    From #1175 (comment):

    It’s a bit silly to not include files like .gitignore and .cirrus.yml. I mean this is for devs of the library, you would want to have these files.

    Maybe you just got my comment the wrong way around? I said, “it’s silly NOT to include (…)”, so I’m arguing to include the files in the archive! I think they belong to the repo. Even as a local developer without git, you could potentially be interested in what is run on CI or what the maintainers believe should be in .gitignore (and other tools such as ripgrep use .gitignore, etc…) Happy to hear arguments for the other direction, of course. :)

  8. hebasto commented at 7:03 am on April 24, 2023: member
    My bad! Sorry.
  9. real-or-random commented at 7:04 am on April 24, 2023: contributor

    My bad! Sorry.

    No worries. :)

  10. real-or-random closed this on Apr 25, 2023

  11. hebasto deleted the branch on Apr 29, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 14:15 UTC

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