Skip to content

Introduce cache for mgit #88

@pjasiun

Description

@pjasiun

This is an idea which comes to our mind talking with @ma2ciek. With more and more repositories to handle mgit2 bootstrap commands takes more and more time. We could make it faster by introducing local cache for it.

How it could work? Whenever you call mgit bootstrap, mgit first pull to the special system path /global/path/mgit2/cache/name-of-gh-remote. If such folder already exists, mgit only pull, if not, it clones the project. Then it copies .git folder from this special cache to your local folder and install project from that folder. Note that cache needs to keep only .git folder since it contains all files and branches and it has automatic zip compression and garbage collection built in by git.

This way, if multiple projects use the same repositories (what is pretty common case for us) or you call mgit bootstrap (to reinstall your project, to make sure you have clean installation) mgit does not clone the repository, but only pull recent change and copy what should be much faster. Since the cache folder would keep only "clear" repositories, only pull them and execute nothing on them, it should be also pretty safe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions