[PATCH v2] add: add --bulk to index all objects into a pack file

2013-10-04 Thread Nguyễn Thái Ngọc Duy
The use case is tar -xzf bigproject.tar.gz cd bigproject git init git add . # git grep or something The first add will generate a bunch of loose objects. With --bulk, all of them are forced into a single pack instead, less clutter on disk and maybe faster object access. On

Re: [PATCH v2] add: add --bulk to index all objects into a pack file

2013-10-04 Thread Matthieu Moy
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: except that it does not deltifies nor sort objects. I think this should be mentionned in the doc. Otherwise, it seems like git add --bulk is like git add git repack. BTW, will the next git gc be efficient after a add --bulk? I mean: will it

Re: [PATCH v2] add: add --bulk to index all objects into a pack file

2013-10-04 Thread Duy Nguyen
On Fri, Oct 4, 2013 at 2:10 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: except that it does not deltifies nor sort objects. I think this should be mentionned in the doc. Otherwise, it seems like git add --bulk is like git add git

Re: [PATCH v2] add: add --bulk to index all objects into a pack file

2013-10-04 Thread Duy Nguyen
On Fri, Oct 4, 2013 at 1:57 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: It's not an all-win situation though. --bulk is slower than --no-bulk because: - Triple hashing: we need to calculate both object SHA-1s _and_ pack SHA-1. At the end we have to fix up the pack, which means