HeadSHA returns the short (12 char) commit sha of HEAD for the repository
containing dir, or "" when dir is not inside a git repository or HEAD
cannot be resolved. It never fails: image tags fall back to timestamps.
RepoRoot returns the folder containing the repository dir belongs to, or ""
when dir is not inside one. donkey uses it to name spaces: every app in a
repository belongs together.