* Check git status from project repo, not cwd * Add git head ref name to update metadata * Reuse some test code