Skip to content

feat: add -j/--jumbo option for large repos#80

Merged
dwilding merged 3 commits intomainfrom
shallow-clone
Feb 22, 2026
Merged

feat: add -j/--jumbo option for large repos#80
dwilding merged 3 commits intomainfrom
shallow-clone

Conversation

@dwilding
Copy link
Copy Markdown
Owner

This PR adds an option -j/--jumbo that tells Git to create a shallow clone. The shallow date is the date of the latest commit on the repo's main branch minus three weeks.

For now, the three week offset is not configurable. There needs to be some offset, to help make sure that Git fetches enough history for merges, but not so much that Git spends a long time downloading history. I'll see how three weeks works in practice.

In addition to the convenience of automatically setting a --shallow-since date, gimmegit is able to tell Git to apply the same date when fetching feature/base branches. If --shallow-since is only applied to the git clone, fetching additional branches can still bring in too much history. This means that -j is not equivalent to providing -- --shallow-since <date>.

I suppose it would be possible to inspect any extra options, extract --shallow-since, then include the same --shallow-since option when fetching branches. I'm open to implementing that at some point if it would be valuable.


This PR also includes a few small fixes and improvements to the code and docs.

Copilot AI review requested due to automatic review settings February 22, 2026 00:11

This comment was marked as resolved.

@dwilding dwilding merged commit 0401c59 into main Feb 22, 2026
8 checks passed
@dwilding dwilding deleted the shallow-clone branch February 22, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants