Add refName function for use in gt-branches command