summaryrefslogtreecommitdiff
path: root/include/get.sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/get.sh')
-rw-r--r--include/get.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/get.sh b/include/get.sh
index 38096e8c..6c7ddcf3 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -232,6 +232,15 @@ try_git()
x_ mv "$tmpgitcache" "$gitdest"
fi
+ if git -C "$gitdest" whatchanged "$7" 1>/dev/null 2>/dev/null; then
+ # don't try to pull the latest changes if the given target
+ # revision already exists locally. this saves a lot of time
+ # during release builds, and reduces the chance that we will
+ # interact with grub.git or gnulib.git overall during runtime
+
+ return 0
+ fi
+
( x_ git -C "$gitdest" remote remove main ) || :
( x_ git -C "$gitdest" remote remove backup ) || :