Change to add options for ref and sha.
Add specs for references commands.
Change reference commands api to take ref and sha params.