Skip to content

Commit

Permalink
Fetch target_version (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu authored Sep 18, 2021
1 parent 1d6963c commit 6e39bee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/setup_remote
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ else
fi

echo Switching $TARGET to version $TARGET_VERSION
(cd $TARGET
git checkout --detach --no-guess $TARGET_VERSION -- || git checkout --detach --no-guess origin/$TARGET_VERSION --
(
cd $TARGET
# Necessary if target isn't a named branch or tag, a noop otherwise.
git fetch origin $TARGET_VERSION
git checkout --detach --no-guess $TARGET_VERSION -- || git checkout --detach --no-guess origin/$TARGET_VERSION --
)

echo -n "Last $TARGET commit: "
Expand Down

0 comments on commit 6e39bee

Please sign in to comment.