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.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 612aac4353..35da14d71b 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -353,10 +353,9 @@ class Git(FetchMethod):
353 break 353 break
354 354
355 if needupdate: 355 if needupdate:
356 try: 356 output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir)
357 runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) 357 if "origin" in output:
358 except bb.fetch2.FetchError: 358 runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
359 logger.debug(1, "No Origin")
360 359
361 runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir) 360 runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir)
362 fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl) 361 fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl)