|
|
Subscribe / Log in / New account

Git archive generation meets Hyrum's law

Git archive generation meets Hyrum's law

Posted Feb 3, 2023 11:33 UTC (Fri) by cortana (subscriber, #24596)
In reply to: Git archive generation meets Hyrum's law by bof
Parent article: Git archive generation meets Hyrum's law

In my case, the practical reason is that I'm building a container image and I don't want to download the whole history of the project only to throw it away.

(Admittedly I believe there's an option to git-clone which does this, only last time I used it I don't think it worked.)

The philosophical reason is a strongly held belief that a software release is a thing with certain other things attached to it (release notes, a source archive, maybe some binary archives). Once created, those artefacts are immutable.

If a software project isn't doing that then it's not a mature project doing release management, it's a developer chucking whatever works for them over the wall. Which is fine, most project start that way; but we've all been taking advantage of the convenience of GitHub's generated-on-the-fly source archives, instead of automating the creation of these source archives as part of our release processes and attaching them to GitHub releases.

As another poster said, for projects which _do_ do that they then have the problem that the GitHub 'source archive' links can't be removed, so now users have to learn "don't click on the obvious link to get the source code, instead you have to download this particularly-named archive attached to the release and ignore those other ones". GitHub really needs a setting that a project can set to get rid of those links!


to post comments

Git archive generation meets Hyrum's law

Posted Feb 3, 2023 11:52 UTC (Fri) by Wol (subscriber, #4433) [Link] (1 responses)

> (Admittedly I believe there's an option to git-clone which does this, only last time I used it I don't think it worked.)

There is. I think it's called a shallow clone. Something like --depth=1.

But last I heard, for a lot of projects, the size of the shallow clone is actually a *large* percentage of the full archive.

Cheers,
Wol

Git archive generation meets Hyrum's law

Posted Feb 3, 2023 17:02 UTC (Fri) by cortana (subscriber, #24596) [Link]

Yeah I think that was it. I gave up on it because it didn't actaully save any time/disk space. Whereas downloading a source archive saved significant amounts of both!


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds