laforge has submitted this change. ( 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(-)
Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
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