Miklos Vajna schrieb: > 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 > ---- Avoid 'seq'; it is not available everywhere. To avoid spawning 500 processes, you could create a pack file from the files using fastimport, then unpack that for each test case. But you must move the pack out of .git/objects/pack before unpacking, otherwise it won't unpack anything. -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html