Live data from Hacker News

Are tarballs obsolete?

esr.ibiblio.org

1–10 of 85 posts

Re: Are tarballs obsolete?

#3

Correct me if I'm wrong but doesn't a git clone involve downloading the project's entire git history as well as $CURRENT_VERSION? That seems a little excessive.

You can use `--depth=1` to only download one revision, and `--branch` to specify an alternate branch or tag.

Re: Are tarballs obsolete?

#5

Correct me if I'm wrong but doesn't a git clone involve downloading the project's entire git history as well as $CURRENT_VERSION? That seems a little excessive.

By default, yes. But you can use the --depth option to limit it to a clone of the most recent state.

Re: Are tarballs obsolete?

#7

Correct me if I'm wrong but doesn't a git clone involve downloading the project's entire git history as well as $CURRENT_VERSION? That seems a little excessive.

While I disagree with the authors sentiment as a whole; this issue could be solved by using a shallow clone.

Re: Are tarballs obsolete?

#9

Correct me if I'm wrong but doesn't a git clone involve downloading the project's entire git history as well as $CURRENT_VERSION? That seems a little excessive.

Ironically git actually supports TAR for this exact thing: git archive exports tar files.

You can do a low depth to minimize that if you want (--depth=1 or something like that if I remember correctly). You could just rm -rf the root .git directory after but that is a download bloat issue.

That said this should work:

    git clone --depth=1 --branch=master git://myrepo && rm -rf myrepo/.git`
but.. yeah. Not really great.

Re: Are tarballs obsolete?

#10
Absolutely not; there are a myriad of reasons to prefer tarballs over Git:

- Offline use - Permission restrictions (Internal git networks) - True-persistent versioning (Can always delete and update a tag), no external tools needed to download - Can restrict extra garbage that may not be need to be shipped - Etc.

Post reply on HN