diff options
author | James Moger <james.moger@gitblit.com> | 2011-07-20 21:06:17 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-07-20 21:06:17 -0400 |
commit | dd6f08950e36694d9757adc84ed6805620d0c032 (patch) | |
tree | 5b154f313150d7ff05048c8d2df46dbbccd2f62f /src/com/gitblit/utils | |
parent | 230632f582e7f1647cf15bc3ebd6148cb9af43c0 (diff) | |
download | gitblit-dd6f08950e36694d9757adc84ed6805620d0c032.tar.gz gitblit-dd6f08950e36694d9757adc84ed6805620d0c032.zip |
Fixed rename and delete repository (issue 10)
This was due to use of the FileResolver which caches repository objects.
Calling close() on a cached repository instance would decrement a
counter, but the repository would never really close and release all its
resources because the FileResolver "held" the first count/reference so
the object and refs databases were never closed.
The solution was to use reflection to determine the actual "useCnt" of
the repository and then call close() that number of times. In practice,
the "useCnt" is probably always 2, and that is the default value in case
reflection fails.
Diffstat (limited to 'src/com/gitblit/utils')
0 files changed, 0 insertions, 0 deletions