pcmanus/ccm — pull request #55 by EnigmaCurry (2013-04-03 17:52:24+00:00)
Title: Creates a local git repository cache to reduce the number of remote fetches

Currently with a command like:

ccm create -v git:trunk trunk

ccm will clone the entire git repository from scratch. If I do a subsequent command like:

ccm create -v git:cassandra-1.2 cassandra-1.2

ccm will again clone the entire git repository from scratch.

This patch fixes this so that the first command will clone the remote repository from scratch into a cache directory (~/.ccm/repository/_git_cache), and clone from that to create the requested checkout. The second command will fetch the latest updates into the cache directory, and clone from the local cache.

My current workflow has me checking out lots of versions by git revision id, so this greatly speeds up the process and reduces my network load (and Apache's.) This way I can also go into the ~/.ccm/repository/_git_cache directory and add my own git remotes for my own personal cassandra branch.