diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-02-07 15:50:35 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-02-07 16:01:36 +0100 |
commit | a8fe0dc16c18c260a1bb9e88f467e4c929cf22dc (patch) | |
tree | bb5ecfdebc36a059a3012276c6c48aa065e8e681 /src/libutil/logging.hh | |
parent | 2edd5cf6184a7955ba82a2aed8bbfa870bfeb15f (diff) |
Speed up fetching submodules
Previously we would completely refetch the submodules from the
network, even though the repo might already have them. Now we copy the
.git/modules directory from the repo as an optimisation. This speeds
up evaluating
builtins.fetchTree { type = "git"; url = "/path/to/blender"; submodules = true; }
(where /path/to/blender already has the needed submodules) from 121s
to 57s.
This is still pretty inefficient and a hack, but a better solution is
best done on the lazy-trees branch.
This change also help in the case where the repo already has the
submodules but the origin is unfetchable for whatever reason
(e.g. there have been cases where Nix in a GitHub action doesn't have
the right authentication set up).
Diffstat (limited to 'src/libutil/logging.hh')
0 files changed, 0 insertions, 0 deletions