Well, with some help from some comments on this blog and also from rereading
this message from Aidan Van Dyk and understanding it a lot more this time, I think I have a handle on how the buildfarm should support Git repositories.
When the branch copy (which will be called
[branchname]/pgsql, just as it is with CVS) exists, the buildfarm client will do an update by simply calling
git pull. Where it does not exist, the client will create it by calling
git clone followed by
git checkout -t origin/[branchname] -b bf_[branchname].
This part is already working with my test buildfarm animal, in fact.
What I will add is support for an additional
git_references config parameter, which can be used as part of the clone command. By default it will not be there, in which case the user would get a plain clone of the configured master repo. Setting up the references repo would be something documented but not done by the script.
One of the things that is mildly annoying from a developer perspective (it won't really affect buildfarm users) is that, as I understand it, when using Aidan's recommendation, getting updates into your working copy will require two commands rather than one (
git fetch on your local master followed by
git pull on your working copy). I guess that can be aliased, and it's something I will probably do pretty soon.