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.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 0513348a18..526668bc23 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -262,23 +262,7 @@ class Git(FetchMethod):
262 if ud.bareclone: 262 if ud.bareclone:
263 cloneflags += " --mirror" 263 cloneflags += " --mirror"
264 264
265 # Versions of git prior to 1.7.9.2 have issues where foo.git and foo get confused 265 runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, ud.clonedir, destdir), d)
266 # and you end up with some horrible union of the two when you attempt to clone it
267 # The least invasive workaround seems to be a symlink to the real directory to
268 # fool git into ignoring any .git version that may also be present.
269 #
270 # The issue is fixed in more recent versions of git so we can drop this hack in future
271 # when that version becomes common enough.
272 clonedir = ud.clonedir
273 if not ud.path.endswith(".git"):
274 indirectiondir = destdir[:-1] + ".indirectionsymlink"
275 if os.path.exists(indirectiondir):
276 os.remove(indirectiondir)
277 bb.utils.mkdirhier(os.path.dirname(indirectiondir))
278 os.symlink(ud.clonedir, indirectiondir)
279 clonedir = indirectiondir
280
281 runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
282 os.chdir(destdir) 266 os.chdir(destdir)
283 repourl = self._get_repo_url(ud) 267 repourl = self._get_repo_url(ud)
284 runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d) 268 runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d)