diff options
-rw-r--r-- | bitbake/lib/bb/fetch/git.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index 9cd538854f..b6126cbe91 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py | |||
@@ -85,6 +85,11 @@ class Git(Fetch): | |||
85 | 85 | ||
86 | return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) | 86 | return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) |
87 | 87 | ||
88 | def forcefetch(self, url, ud, d): | ||
89 | if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm: | ||
90 | return True | ||
91 | return False | ||
92 | |||
88 | def go(self, loc, ud, d): | 93 | def go(self, loc, ud, d): |
89 | """Fetch url""" | 94 | """Fetch url""" |
90 | 95 | ||
@@ -108,8 +113,8 @@ class Git(Fetch): | |||
108 | runfetchcmd("%s clone -n %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d) | 113 | runfetchcmd("%s clone -n %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d) |
109 | 114 | ||
110 | os.chdir(ud.clonedir) | 115 | os.chdir(ud.clonedir) |
111 | # Remove all but the .git directory | ||
112 | if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm: | 116 | if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm: |
117 | # Remove all but the .git directory | ||
113 | runfetchcmd("rm * -Rf", d) | 118 | runfetchcmd("rm * -Rf", d) |
114 | runfetchcmd("%s fetch %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.branch), d) | 119 | runfetchcmd("%s fetch %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.branch), d) |
115 | runfetchcmd("%s fetch --tags %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d) | 120 | runfetchcmd("%s fetch --tags %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d) |