laforge submitted this 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(-)
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.