|
|
Log in / Subscribe / Register

Resuming clones

Resuming clones

Posted Feb 11, 2026 21:55 UTC (Wed) by jengelh (subscriber, #33263)
Parent article: Evolving Git for the next decade

In addition, there is no support for resuming a cloning operation

But there is! clone is just init+fetch+checkout, and "all that's left to do"™ is pick suitable checkpoints. Like so:

git init; git remote add origin https://..../linux.git
for i in v2.6.12-rc2 v2.6.12-rc3 ... v6.19; do
  git fetch origin refs/tags/$i:refs/tags/$i
done
git fetch origin
#git gc
git checkout -b master origin/HEAD


to post comments

Resuming clones

Posted Feb 12, 2026 2:14 UTC (Thu) by Nahor (subscriber, #51583) [Link] (4 responses)

sooo... what you're saying, is that the clone operation does not support resuming, right? That if you want to be able to do that, you have to do it yourself instead.

But even when trying to do it manually, can you resume a fetch operation? *Lots* of *big* stuff can happen between two tags, making each tag very heavy to download.
And how do you get the list of tags in the first place when you don't have the repo on your drive yet?
And what of repos with tons of tags (see the whole "reftables" section in the article)? Creating a new connection to the git server for each tag will likely cost you more than trying to clone from scratch.

Resuming clones

Posted Feb 12, 2026 15:11 UTC (Thu) by mathstuf (subscriber, #69389) [Link] (1 responses)

> And how do you get the list of tags in the first place when you don't have the repo on your drive yet?

`git ls-remote` works with a local empty repo.

Resuming clones

Posted Feb 16, 2026 9:52 UTC (Mon) by taladar (subscriber, #68407) [Link]

Actually it works without any local repo at all if you specify the repo URL.

Resuming clones

Posted Feb 12, 2026 16:06 UTC (Thu) by jengelh (subscriber, #33263) [Link] (1 responses)

>*Lots* of *big* stuff can happen between two tags, making each tag very heavy to download.

You can go as fine-grained as blobs. Yeah, you can still have gigabitely-sized blobs (not that I think you should).

Wait... y'all remember the time when Git repos could be accessed by Dumb HTTP, i.e. without /usr/libexec/git/git-http-backend? There's the resume support you were looking for :-p

Resuming clones

Posted Feb 12, 2026 18:28 UTC (Thu) by brunowolff (guest, #71160) [Link]

> Wait... y'all remember the time when Git repos could be accessed by Dumb HTTP, i.e. without /usr/libexec/git/git-http-backend?

I think that still works. I recently put some git repos for openscad sources for 3d prints up on a server. I currently do pulls to get updates from the source repos I work in. I found out you need run update-server-info to update the refs or cloning won't work. I used post-update.sample as a post-merge hook to do that automatically when I do pulls. I tested cloning using http and it seems to work properly.


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