Open endersonmaia opened 1 year ago
Interesting idea. I think somehow we should extract such metadata from tar archive. We use node-tar internally might be a way to retrieve commit id.
Thanks. Seems reading is not that hard even if node-tar does not supports, we can easily find comment header: (update we can: https://github.com/isaacs/node-tar#class-tarpax)
> head release.tar
pax_global_header00006660000000000000000000000064143737264400014524gustar00rootroot0000000000000052 comment=8ddd2a4eb6045710c1bac9761e97152cf6af4b8a
Describe the feature
I'd like to inform the user what is the git commit hash that is being downloaded when a branch or tag is passed.
Since giget doesn't depend on git, we'd need to assume that the tarball downloaded from the providers are generated using
git archive
.If that's the case, the commit id could be retrieved from the tarball.
Example:
https://github.com/unjs/giget/commit/8ddd2a4eb6045710c1bac9761e97152cf6af4b8a
Additional information