The public git repositories served up on
are maintained by a simple script, called
. This script pulls all heads matching certain patterns from the internal repository. By default, branches fitting the following criteria will be mirrored:
the master branch (
standard nightly build tags, of the form
branches whose names end with
nightly build tags that end with
-publicbranchand a build date,
- release tags, and
explicitly whitelisted branches (currently
Where is all of this stuff?
for the scripts and the gitweb installation.
How often does this thing run? The old shell-script version ran once every twenty minutes as a cron job. The new Ruby version pulls all matching branches, sleeps for thirty seconds, and then runs itself again; it uses cron essentially as a watchdog. (That is, at most one mirror job targeting a given destination repository will run at a time.)
When should I expect to see my changes to a mirrored branch reflected in the public repository?
A pull shouldn't take more than five minutes, so the worst-case scenario for the new mirror script is probably under ten minutes. (The real worst-case scenario involves waiting for the cron job to restart
, but your average wait time in that case should still be under fifteen minutes.)
How can I tell if my (sensitive) branch will be mirrored to the public repository?
You can run
yourself on your personal repo with the
option, and it will show you the list of branches and tags it would have pushed, given the default options.
How can I tell if my (non-sensitive) branch will be mirrored to the public repository? Push it to the main internal repo and wait for at most fifteen minutes.
How can I recognize an additional set of branch or tag names to be mirrored to the public repository?
The first question to ask yourself is "do I really need to do this?" Unless you're dealing with something inflexible that expects a certain kind of branch or tag name, it's better to use a name that already fits one of the existing patterns. However, it's easy to make the script recognize additional patterns: simply specify the additional pattern as a command-line argument to
in the crontab entry: use
to specify that head names matching
should be pushed or
to the name whitelist.
What else can I do with this script?
Glad you asked! Run
for more details.