aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-27 22:32:45 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-27 22:37:22 +0200
commitf9c1cb2777cfc2241a51749ea126dfd1f02276be (patch)
treeb53b6316e9f6a09a7ec9a4b333226db68c186827
parent7c5e34cba004837189c92ca015856a06288872e0 (diff)
scripts: use 'git checkout -f' instead of 'reset --hard'
'checkout -f' more accurately does what is intended. 'reset' changes the current branch to some hash, 'checkout -f' force-checkouts another branch. Change-Id: Ic6279ebaf8160bceb3fa2ab40eff0b888ecd5009
-rwxr-xr-xscripts/osmo-deps.sh2
-rwxr-xr-xscripts/osmo-layer1-headers.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/osmo-deps.sh b/scripts/osmo-deps.sh
index 92cf041..74de22b 100755
--- a/scripts/osmo-deps.sh
+++ b/scripts/osmo-deps.sh
@@ -16,5 +16,5 @@ git fetch origin
# the dep subdir separately:
osmo-clean-workspace.sh
-git reset --hard "$branch"
+git checkout -f "$branch"
git rev-parse HEAD
diff --git a/scripts/osmo-layer1-headers.sh b/scripts/osmo-layer1-headers.sh
index 374515e..a975396 100755
--- a/scripts/osmo-layer1-headers.sh
+++ b/scripts/osmo-layer1-headers.sh
@@ -44,4 +44,4 @@ fi
cd layer1-headers
git fetch origin
-git reset --hard "$version"
+git checkout -f "$version"