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.
We currently call
git show $REF:$PATHwhich does not match remote branches. It only works with commit refs and local branches names. When the branch has not been checkDo we need to failover to
git show origin/$REF:$PATHifgit show $REF:$PATHfails? Seems like the easiest option.A missing ref currently outputs the following:
The first line is from the
git showcall. If we matchorigin/$REFafter failing$REF, we should not output thefatal: Not a valid object nameerror from the first call. We should probably output both errors if both calls fail.