diff --git a/doc/demos/dedup.md b/doc/demos/dedup.md new file mode 100644 index 0000000000000000000000000000000000000000..71fab649cc4a7b62753446966b336cb193a1ab77 --- /dev/null +++ b/doc/demos/dedup.md @@ -0,0 +1,20 @@ +# Git Object Deduplication demo + +## Script + +- Start with GDK with gitlab-ee master and gitaly master +- Separate terminal: `gdk run db` +- `rm -f .gitlab-bundle .gitlab-yarn && make gitlab-update gitaly-update` +- `gdk run app` +- create PUBLIC group parent +- create PUBLIC project in parent group from pushing the local gitlab-ce copy +- separate terminal: `bin/rails console +- console: `Feature.enable(:object_pools)` +- create group for fork +- fork into new group +- console: `ActiveRecord::Base.logger.level = Logger::INFO` +- console: `def sizes; Project.all.each { |p| printf("%4d %s\n", p.repository.raw.size, p.inspect) };nil; end` +- console: `def pool(id); PoolRepository.find(id); end` +- console: `def show_alt(p) ; system('cat', File.join('../repositories', p.repository.relative_path, 'objects/info/alternates')); end` +- try to break stuff: `PoolRepository.all.each(&:destroy)`. Do projects still work? +