Clean up by Otavio Salvador
authorHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 26 Feb 2009 17:12:06 +0000 (17:12 +0000)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Thu, 26 Feb 2009 17:12:06 +0000 (17:12 +0000)
lib/bb/fetch/git.py

index f3d4fa4..ad6919b 100644 (file)
@@ -49,12 +49,9 @@ class Git(Fetch):
         elif tag:
             ud.tag = tag
 
-        if not ud.tag:
+        if not ud.tag or ud.tag == "master":
             ud.tag = self.latest_revision(url, ud, d)  
 
-        if ud.tag == "master":
-            ud.tag = self.latest_revision(url, ud, d)
-
         ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
 
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)