git repository size / compression
- From
- neubyr <neubyr@gmail.com>
- Date
- Sep 9, 2011, 02:37 UTC
- Message-ID
- <CALFxCvzVjC+u=RDkDCQp0QqPETsv8ROE8tY=37tmMWxmQoJOEw@mail.gmail.com>
I have a test git repository with just two files in it. One of the file in it has a set of two lines that is repeated n times. e.g.: {{{ $ for i in {1..5}; do cat ./lexico.txt >> lexico1.txt && cat ./lexico.txt >> lexico1.txt && mv ./lexico1.txt ./lexico.txt; done }}}
I ran above command few times and performed commit after each run. Now disk usage of this repository directory is mentioned below. The 419M is working directory size and 2.7M is git repository/database size.
{{{ $ du -h -d 1 . 2.7M ./.git 419M .
}}}
Is it because of the compression performed by git before storing data (or before sending commit)??
Following were results with subversion:
Subversion client (redundant(?) copy exists in .svn/text-base/ directory, hence double size in client): {{{ $ du -h -d 1 416M ./.svn 832M . }}}
Subversion repo/server:
{{{
$ du -h -d 1
12K ./conf
1.2M ./db
36K ./hooks
8.0K ./locks
1.2M .
}}}-- neuby.r