Skip to contentSkip to conversation

fetch2: Checkout to correct ref begore init and update submodules

PATCH New [email protected] 1 participant 1 message Jul 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2: Checkout to correct ref begore init and update submodules

From: "Felipe F. Tonello" <[email protected]>

This is nessary when specified branch with submodules is different then default (master) branch.

---
 lib/bb/fetch2/gitsm.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/fetch2/gitsm.py +1 -0
index c125cff..0392e48 100644
@@ -109,6 +109,7 @@ class GitSM(Git):
         runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*true/bare = false/'", d)
         os.chdir(tmpclonedir)
         runfetchcmd(ud.basecmd + " reset --hard", d)
+        runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
         runfetchcmd(ud.basecmd + " submodule init", d)
         runfetchcmd(ud.basecmd + " submodule update", d)
         self._set_relative_paths(tmpclonedir)
Signature · 1 line
2.1.0