Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index 26d96585cc667c0b7fd54a62372171e1c732b7e1..1b50abee9c402ed74349cf2e13329f1d42f5aeb2 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -356,6 +356,13 @@ class GitWrapper(SCMWrapper): |
verbose = ['--verbose'] |
printed_path = True |
+ if not managed: |
+ self.Print('________ unmanaged solution; skipping %s' % self.relpath) |
+ try: |
+ return self._Capture(['rev-parse', '--verify', 'HEAD']) |
+ except subprocess2.CalledProcessError: |
+ return None |
+ |
url = self._CreateOrUpdateCache(url, options) |
if revision.startswith('refs/'): |
@@ -389,11 +396,6 @@ class GitWrapper(SCMWrapper): |
self.Print('') |
return self._Capture(['rev-parse', '--verify', 'HEAD']) |
- if not managed: |
- self._UpdateBranchHeads(options, fetch=False) |
- self.Print('________ unmanaged solution; skipping %s' % self.relpath) |
- return self._Capture(['rev-parse', '--verify', 'HEAD']) |
- |
# See if the url has changed (the unittests use git://foo for the url, let |
# that through). |
current_url = self._Capture(['config', 'remote.%s.url' % self.remote]) |