temp workaround for fetch refs/builds/*
diff --git a/git_config.py b/git_config.py
index 32879ec..6ab286e 100644
--- a/git_config.py
+++ b/git_config.py
@@ -634,6 +634,9 @@
 
     if not rev.startswith('refs/'):
       rev = R_HEADS + rev
+    # ugly workaround
+    if rev.startswith('refs/builds/'):
+        return RefSpec(True, 'refs/builds/*', 'refs/builds/*').MapSource(rev)
 
     for spec in self.fetch:
       if spec.SourceMatches(rev):
diff --git a/project.py b/project.py
index 127176e..f43bcc5 100644
--- a/project.py
+++ b/project.py
@@ -1807,6 +1807,8 @@
     if not current_branch_only:
       # Fetch whole repo
       cmd.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*')))
+      if self.upstream and self.upstream.startswith('refs/builds'):
+        cmd.append((u'+%s:' % self.upstream) + remote.ToLocal(self.upstream))
     elif tag_name is not None:
       cmd.append('tag')
       cmd.append(tag_name)
@@ -1816,7 +1818,9 @@
         branch = self.upstream
       if branch.startswith(R_HEADS):
         branch = branch[len(R_HEADS):]
-      cmd.append(str((u'+refs/heads/%s:' % branch) + remote.ToLocal('refs/heads/%s' % branch)))
+        cmd.append(str((u'+refs/heads/%s:' % branch) + remote.ToLocal('refs/heads/%s' % branch)))
+      else:
+        cmd.append(str((u'+%s:' % branch) + remote.ToLocal(branch)))
 
     ok = False
     for _i in range(2):