|
|
|
[
Permlink
| « Hide
]
Robin Shen [02/Nov/13 01:40 AM]
Thanks for sharing the idea. My understanding is that the reference repository serves as a cache, and it should also gets synced with remote repository in a regular basis in order not to cause too much cache misses. Also this approach is mainly for purpose of reducing clone time, but can not help reducing disk space usage. Am I correct on this?
Oh, no, it is a huge space saver. For example, on my desktop I have a month-old 3.4gb reference copy and four workspaces that use it (each for a different branch in the same repository). The .git folder in each of those workspaces is between 50 and 75mb.
It is not just a cache; any database object that is needed in the workspace .git folder is linked against the reference copy; it is *not* copied into each workspace that needs it. Only objects added since the reference copy was created need to exist in the workspace's .git folder. Over time, as changes are made to the origin repository, it grows more disparate from the reference copy, and clones become larger. I find I have to rebuild my reference copy about once every quarter to keep my clones under 100mb - and really, even 100mb is tiny compared to the size of the reference copy. Of course, this does not help with the size of the workspace itself; my library of checked out files in each workspace still amount to about 6gb each, plus the size of derived objects from the build. But at least I am not pulling down 3.4gb over the network every time I make a new clone. This would be particularly useful for QuickBuild, since it looks like every configuration needs to have its own workspace, even multiple configuration builds of the same branch (for example, debug, release, continuous...) Jenkins has this capability and we are using it heavily in our current deployment. I can see the lack of this feature being an impediment to my convincing the team to move from Jenkins to QuickBuild. I understand it now, will take care of this soon.
One can define reference setting in advanced setting of Git repo now.
Thanks, Robin. However, it looks like the Reference repository doesn't take a script/variable definition?
This makes it hard when some boxes are on Windows and some on Linux. Or if I have my repository configured with a path like: ] ssh://hostname/git/${vars.getValue("gitRepoName")} in which case I want my reference to be ] E:\reference\${vars.getValue("gitRepoName")} But thank you for the start! |