Git Reference Repos?

How can I configure TeamCity to use them? It would be really nice to not be forced to duplicate the whole git repository on every checkout.

5 comments
Comment actions Permalink

Hi,

I’ve been wondering about this too.

We are using TC 8.0.4 with agent site checkout with git.

Even if theres just a single byte changed with a new commit, TC lets git fetch some hundred megabytes. See attached log file.

I’ve tried the same commands manually on my dev machine resulting in the same “big fetch”. But the fetch is done in a blink, when I skip these both lines:

git.exe update-ref -d refs/remotes/origin/master

git.exe update-ref -d refs/heads/master

   

I’ve tried a network share repository instead of TFS with the same results.

I've also tried different git versions on TC agent: 1.7.8, 1.7.11 and 1.8.4

PS: local mirroring does not help. It’s even worse: It’s producing the same “big fetch” on the mirror-repository plus the full or shallow fetch locally.



Attachment(s):
teamcity-vcs.log.zip
0
Comment actions Permalink

Christian did you mean the problem Bernhard has described?

0
Comment actions Permalink

Thanks Bernhard,

it seems like git-plugin removes some branches incorrectly. I've created an issue, please watch it http://youtrack.jetbrains.com/issue/TW-33401.

0
Comment actions Permalink

No, my problem is that I would like to configure a reference repo on every host used by TeamCity. See help on "git clone --reference". Essentially, it allows one to create many clones which only use the space for the working tree, not space for the whole history. It's a godsend if you have many different tasks all running on the same set of hosts using the same git repo.

To get the best use, every checkout needs to be preceeded by a fetch in the reference repo - but that's not required. Git is smart enough to store revs not present in the reference repo locally - but obviously it makes sense to fetch the reference repo often.

The lack of support for this feature is currently a major blocker for us to move away from Jenkins.

0
Comment actions Permalink

We don't use them yet, please watch/vote for http://youtrack.jetbrains.com/issue/TW-33417.

0

Please sign in to leave a comment.