Chromium Code Reviews| Index: gclient_scm.py |
| =================================================================== |
| --- gclient_scm.py (revision 186550) |
| +++ gclient_scm.py (working copy) |
| @@ -655,6 +655,9 @@ |
| detach_head = True |
| if options.verbose: |
| clone_cmd.append('--verbose') |
| + if options.with_branch_heads: |
| + clone_cmd.extend(['--config', 'remote.origin.fetch=+refs/branch-heads/*:' |
| + 'refs/remotes/branch-heads/*']) |
| clone_cmd.extend([url, self.checkout_path]) |
| # If the parent directory does not exist, Git clone on Windows will not |
| @@ -677,6 +680,14 @@ |
| try: |
| self._Run(clone_cmd, options, cwd=self._root_dir, filter_fn=_GitFilter, |
| print_stdout=False) |
| + # Update the "branch-heads" remote-tracking branches, since clone |
| + # doesn't automatically fetch those, and we might need it to checkout a |
| + # specific revision below. |
| + if options.with_branch_heads: |
| + fetch_cmd = ['fetch'] |
|
szager1
2013/03/07 01:12:32
fetch_cmd = ['fetch', 'origin']
It's possible tha
Michael Moss
2013/03/07 03:12:07
Done.
|
| + if options.verbose: |
| + fetch_cmd.append('--verbose') |
| + self._Run(fetch_cmd, options) |
| break |
| except subprocess2.CalledProcessError, e: |
| # Too bad we don't have access to the actual output yet. |