`sha1` isn't a very accurate description of what this value can be
because it can be any git commit reference. For example, `brew test-bot`
uses `brew update-test --commit=HEAD`.
This is the (partially) documented public API for Homebrew.
The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.