Rather than inserting the configuration for Git inside the user's global configuration (~/.gitconfig), it seems preferable to include it by simply adding something like
[include]
path = ~/.tidbits/gitconfig
(For reference, see: git/git@9b25a0b)
The main problem with overloading the user's ~/.gitconfig is that we can easily wind up with instances where there are multiple values for one configuration setting, which can prevent the git config command from functioning. For instance, suppose both the Tidbits section and the rest of a config file both have:
[example "test"]
blah = yada
and the user runs a script that executes git config --global example.test.blah yackety, they will get an error:
warning: example.test.blah has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change example.test.blah.
Inclusion of external config files should work in Git 1.7.10.2 and up. If we wanted to support earlier versions (and I don't think we care about them) we could put the Tidbits configurations in /etc/gitconfig (or just maintain the current behavior for ancient versions of Git).