mozilla/browserid — pull request #2284 by lloyd (2012-08-14 19:01:54+00:00)
Title: update version.js to run asynchronously and eliminate race conditions in code

The way that `version.js`, a tiny library to determine the currently running code version, worked made it impossible to reliably determine the software version at startup. Because it would return a bogus (randomly generated) version until the `git` program could return the actual version, code would have to wait.

This improvement makes it possible to write a command line program (or server) that gets the version without any setTimeouts as soon as it is available.

This is motivated by the automation testing work that's ongoing.