Partition the on-disk repository directories by Repository#hashed_path [migration]
authorJohan Sørensen <johan@johansorensen.com>
Tue, 3 Feb 2009 12:08:26 +0000 (13:08 +0100)
committerJohan Sørensen <johan@johansorensen.com>
Wed, 22 Apr 2009 10:55:24 +0000 (12:55 +0200)
commit65f1cf8ef3dde99a15f8af0c905e1c2bf45bf7b7
treea387ffea89f9a397c73380dd9646da7c5cb71706
parentada1b09dc414176fad2ae2fc716ecb82e517217e
Partition the on-disk repository directories by Repository#hashed_path [migration]
Use script/shard_git_repositories_by_hash to migrate the existing directory
structure

The main reasons for this change is two-fold:
a) speed up directory access when there's loads of clones
b) make it easier to find a repository on disk from either a User, Group or Project

Instead of using Repository#gitdir to find the on-disk repo, you'd now need to
use either #real_gitdir or #full_repository_path
app/models/repository.rb
db/migrate/20090203101718_add_hashed_path_to_repositories.rb [new file with mode: 0644]
script/shard_git_repositories_by_hash [new file with mode: 0755]
spec/fixtures/repositories.yml
spec/models/repository_spec.rb