Skip to content

--ref=foo should work with remote branches #148

@jasoncodes

Description

@jasoncodes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions