XD blog

blog page

tortoisegit


2015-05-23 Jenkins, TortoiseGit and locked files on Windows

Some errors can be very annoying sometimes if they come back again and again. Here is one of them: TortoiseGit locks repository folders so that the user can't delete them which I throught was caused by Jenkins. So annoying that it was mentioned in a couple of issues 401, 497, 1880. I could avoid using TortoiseGit but that's the only git GUI I don't have to remember the usage.

So let's tweak the TortoiseGit's Settings even if some changes seem to fix it:

TGitCache now checks file sizes before checking file contents. 
This should mitigate possible "file is locked" problems.
TGitCache now does not check the contents of files with filesize > 10 MiB any more
and falls back to checking the timestamp of the files (as if TGitCacheCheckContent
is set to "false") according the the git index. This limit can be changed by adjusting
TGitCacheCheckContentMaxSize (measured in KiB) in TortoiseGit advanced settings.
The reason for this change is that libgit2 reads a file to memory for hashing and,
thus, locking the file and the repository for this time span.

A couple of tricks:


Xavier Dupré