fresh
fresh copied to clipboard
`--ref=foo` should work with remote branches
We currently call git show $REF:$PATH which does not match remote branches. It only works with commit refs and local branches names. When the branch has not been check
Do we need to failover to git show origin/$REF:$PATH if git show $REF:$PATH fails? Seems like the easiest option.
A missing ref currently outputs the following:
fatal: Not a valid object name $REF
Error: Could not find "$PATH" source file.
/home/user/.freshrc:1: fresh $REPO $PATH --ref=$REF
The first line is from the git show call. If we match origin/$REF after failing $REF, we should not output the fatal: Not a valid object name error from the first call. We should probably output both errors if both calls fail.
+1, I recently had issue with remote branches