[PATCH] osmo-ci[master]: scripts: use 'git checkout -f' instead of 'reset --hard'

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Oct 27 20:46:42 UTC 2017


Review at  https://gerrit.osmocom.org/4469

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
---
M scripts/osmo-deps.sh
M scripts/osmo-layer1-headers.sh
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/69/4469/1

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 @@
 # 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 @@
 
 cd layer1-headers
 git fetch origin
-git reset --hard "$version"
+git checkout -f "$version"

-- 
To view, visit https://gerrit.osmocom.org/4469
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6279ebaf8160bceb3fa2ab40eff0b888ecd5009
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list