summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 1faa2145cf..db1e286371 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -361,6 +361,11 @@ class Git(FetchMethod):
361 # we need to try premirrors first as using upstream is destined to fail. 361 # we need to try premirrors first as using upstream is destined to fail.
362 if not trusted_network(d, ud.url): 362 if not trusted_network(d, ud.url):
363 return True 363 return True
364 # the following check is to ensure incremental fetch in downloads, this is
365 # because the premirror might be old and does not contain the new rev required,
366 # and this will cause a total removal and new clone. So if we can reach to
367 # network, we prefer upstream over premirror, though the premirror might contain
368 # the new rev.
364 if os.path.exists(ud.clonedir): 369 if os.path.exists(ud.clonedir):
365 return False 370 return False
366 return True 371 return True