Looking a way to have fixed path of git repo using GitConfigurationSource
manoj13023 opened this issue · comments
Currently GitConfigurationSource is using
clonedRepoPath = Files.createTempDirectory(tmpPath, tmpRepoPrefix);
to create a new directory every time we bind this and processing git clone which obviously need empty directory.
However I am looking a way to have fixed path directory where we can clone only once and do pull on periodic basis. Suppose a case of simple restarting of the application. Every time its cloning into new folder. I wanted to put a check if repository already available locally, do not clone rather do pull. And that also if fails it should go ahead with available data.
Please let me know how I can achieve this?
Thanks
Regards
Manoj
👍 my team would benefit from this functionality as well.
We have an app which starts/stops hundreds of times per day on the same machine. Right now, each invocation causes it to re-download its configuration from our GitHub server causing thousands of temp files to be created on the machine per week. The app configuration is updated only once per week at most so being able to cache one copy of the repository and pull changes at a configurable cadence would greatly help.