osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38220?usp=email )
Change subject: deps/update: don't fetch repos where COMMIT exists ......................................................................
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