osmith has uploaded this change for review.

View Change

deps/update: don't fetch repos where COMMIT exists

Instead of unconditionally fetching each git repository, check if the
commit we want to checkout already exists in the git repository. If that
is the case, then don't fetch it.

Related: OS#6572
Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
---
M deps/update.sh
1 file changed, 4 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/38220/1
diff --git a/deps/update.sh b/deps/update.sh
index ad12bcb..c0a3dab 100755
--- a/deps/update.sh
+++ b/deps/update.sh
@@ -3,7 +3,10 @@
COMMIT="$2"

cd "$DIR"
-git fetch
+
+if ! git cat-file -e "$COMMIT"; then
+ git fetch
+fi

if git rev-parse "origin/$COMMIT" 2>/dev/null; then
set -x

To view, visit change 38220. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I342957668892e7d29666fada82362cb4a6c7aac5
Gerrit-Change-Number: 38220
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>