diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 3de83bed17..7b618c6fb1 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -354,10 +354,9 @@ class Git(FetchMethod): | |||
354 | if not self._contains_ref(ud, d, name, ud.clonedir): | 354 | if not self._contains_ref(ud, d, name, ud.clonedir): |
355 | needupdate = True | 355 | needupdate = True |
356 | if needupdate: | 356 | if needupdate: |
357 | try: | 357 | output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir) |
358 | runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) | 358 | if "origin" in output: |
359 | except bb.fetch2.FetchError: | 359 | runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) |
360 | logger.debug(1, "No Origin") | ||
361 | 360 | ||
362 | runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir) | 361 | runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir) |
363 | fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl) | 362 | fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl) |