<p dir="auto">This would enable people to specify how long the local cache version of a repo is valid for (default would be 0 meaning things are always pulled from the remote).</p>
<p dir="auto">This would mean that if the version: was set to a branch or tag name (or maybe even a hash) we would only look at checking out the most recent version in the local repo, unless the cache time was invalid.</p>
<p dir="auto">This would drastically speed up / give the options to speed up ansible playbooks that have a lot of git module / repo usage.</p>
<p dir="auto">When the git module is given a hash as the version of the repo to checkout the git module should first do a quick check to see if we are already on the given hash!<br>
Currently even if the repo is already on the version / hash we want it seems to pull from the remote and update.<br>
Instead we should make sure the repo exists (pull if it doesn't) and then check the current hash of HEAD and if it matches the hash version we want, do nothing, if it doesn't, pull said hash version.</p>
<p dir="auto">This would drastically increase the speed of playbooks that depend on, say 100 git repos and specify a given version hash</p>