=== modified file 'jhbuild/versioncontrol/git.py'
--- jhbuild/versioncontrol/git.py	
+++ jhbuild/versioncontrol/git.py	
@@ -52,33 +52,34 @@
         # allow user to adjust location of branch.
         self.href = config.repos.get(name, href)
 
-    branch_xml_attrs = ['module', 'checkoutdir']
+    branch_xml_attrs = ['module', 'subdir', 'checkoutdir']
 
-    def branch(self, name, module=None, checkoutdir=None):
+    def branch(self, name, module=None, subdir="", checkoutdir=None):
         if name in self.config.branches:
             module = self.config.branches[module]
         else:
             if module is None:
                 module = name
             module = urlparse.urljoin(self.href, module)
-        return GitBranch(self, module, checkoutdir)
+        return GitBranch(self, module, subdir, checkoutdir)
 
 
 class GitBranch(Branch):
     """A class representing a GIT branch."""
 
-    def __init__(self, repository, module, checkoutdir):
+    def __init__(self, repository, module, subdir, checkoutdir):
         self.repository = repository
         self.config = repository.config
         self.module = module
+        self.subdir = subdir
         self.checkoutdir = checkoutdir
 
     def srcdir(self):
         if self.checkoutdir:
-            return os.path.join(self.config.checkoutroot, self.checkoutdir)
+            return os.path.join(self.config.checkoutroot, self.checkoutdir, self.subdir)
         else:
             return os.path.join(self.config.checkoutroot,
-                                os.path.basename(self.module))
+                                os.path.basename(self.module), self.subdir)
     srcdir = property(srcdir)
 
     def branchname(self):

