Skip to content

Question: how is the Gitman cache updated? #355

@mastupristi

Description

@mastupristi

Hi! I'm trying to better understand how Gitman's cache system works in practice.

As far as I can tell, the cache is created using:

git clone --mirror <repo> <cache_path>

This results in a bare mirror of the original repository stored locally (under .gitman_cache or $GITMAN_CACHE). This is very useful to speed up subsequent clones and to save bandwidth.

However, I couldn't find any documentation or code that clearly describes how and when the cache is refreshed after its first creation.

My questions:

  • Is the cache ever updated by Gitman once it's been created?
  • Is there any built-in mechanism to update or re-fetch tags/commits from the origin into the cache mirror?
  • Or is it up to the user to periodically run something like git fetch --all inside .gitman_cache/<repo>.reference?

Thanks a lot for this great tool, and for any clarification you can provide!

Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions