Skip to content

checkout@v2 doesn't allow git diff origin/master #438

Open
@wdanilo

Description

@wdanilo

Hi, I have such a step in my actions config:

    name: Get list of changed files
    id: changed_files
    run: |
        list=`git diff --name-only origin/master HEAD`
        echo $list
        echo "::set-output name=list::$list"
    shell: bash

When using checkout@v1 it works, while with checkout@v2 I get

fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.

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