Use 'ref' over 'branch' and make optional for external.