Cloning a large git repository can add a large chunk to build time, not to mention disk space. To reduce these costs (as well as network bandwith), it is possible from the git command line to create a bare repository:
> git clone --bare ssh:
user@host/git/myrepo.git myrepo_dir C:\GitRepos\myrepo.git
and then use that bare repository as a reference copy when creating new workspaces on the system:
> git clone --reference C:\GitRepos\myrepo.git ssh:
user@host/git/myrepo.git C:\workspaces\first_workspace
> git clone --reference C:\GitRepos\myrepo.git ssh:
user@host/git/myrepo.git C:\workspaces\second_workspace
It would be very helpful for the git plug-in to QuickBuild to support this model.
All that would be needed would be a field in the Git repository definition 'reference copy', which would be the absolute path to the reference copy (with variable expansion of course).
This would then be passed on the command line via the '--reference' option. If the reference copy does not exist, then this option is already ignored by the git command.
Of course, a truly robust implementation would have the plug-in detect the existence of the reference copy and create it (via the --bare command) if it does not. But that is perhaps over-reaching.
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!