From 9ecb20650bb8106d15fe85a92cb982d8aeca84da Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 17 Jul 2018 15:46:14 -0700 Subject: [PATCH] Fix logic for checking out branches in fixture repos --- script/fetch-fixtures | 4 ++-- script/fetch-fixtures.cmd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/fetch-fixtures b/script/fetch-fixtures index fae41b4e..c8306185 100755 --- a/script/fetch-fixtures +++ b/script/fetch-fixtures @@ -15,9 +15,9 @@ fetch_grammar() { fi ( - cd $grammar_dir; + cd $grammar_dir git fetch origin $ref --depth=1 - git reset --hard origin/$ref; + git reset --hard FETCH_HEAD ) } diff --git a/script/fetch-fixtures.cmd b/script/fetch-fixtures.cmd index 86c65e81..73e0a535 100644 --- a/script/fetch-fixtures.cmd +++ b/script/fetch-fixtures.cmd @@ -22,6 +22,6 @@ SET grammar_branch=%~2 ) pushd %grammar_dir% git fetch origin %2 --depth=1 -git reset --hard origin/%grammar_branch% +git reset --hard FETCH_HEAD popd EXIT /B 0