Hi, I wanted to create a test like t7503-pre-commit-hook.sh for pre-auto-gc but actually I'm not sure how to trigger git gc --auto to do something. Here is what I managed to do so far: ---- git init git config gc.auto 1 for i in `seq 1 500`; do echo $i >file; git add file; done git commit -m init ---- After this, 'git gc --auto' seem to print the 'Auto packing your repository for optimum performance.' message, but the return code is still 0, just like if it did not do anything. So all what I found is that the .git/objects/pack/ directory is empty in a new repo, and if git gc --auto did something, it won't be empty but: 1) this isn't the proper way I'm sure. 2) if I want to do it from a test, then I would need to create the repo from scratch again and again, which is quite dirty. Does anyone have better ideas? Thanks
Attachment:
pgpNEpi00bVYL.pgp
Description: PGP signature