You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CIHelper: optionally clone the Git mailing list mirror
A couple of GitGitGadget's common operations require a local clone of
the Git mailing list mirror.
For obvious reasons, the idea here is to initialize a partial, shallow
clone, so that missing objects (if any) will be retrieved on demand, and
no time is wasted on a full clone every time GitGitGadget wants to look
at mails.
The not-so-obvious idea is to un-shallow the clone using the same
strategy (and in fact, the same function) as for the Git "worktree":
When I tried to simply delete the `shallow` file during the development
of this patch, assuming that Git's partial clone functionality would
gracefully fetch any missing commit e.g. when computing a merge base,
reality taught me the harsh lesson that it would fail hard in such
scenarios. Instead, the `git fetch --unshallow` command is called with
`--filter=tree:0` so that _only_ the missing commits (and all of them)
are fetched. This still seems to strike a good compromise between saving
time on the clone and saving on network round-trips when fetching
missing Git objects.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
0 commit comments