sync: Do a git pull with --use-superproject if superproject tree already exists.

Tested the code with the following commands.

$ ./run_tests -v tests/test_git_superproject.py
$ ./run_tests -v

Tested the sync code by copying all the repo changes into my Android
AOSP checkout and doing a repo sync --use-superproject twice.

.../WORKING_DIRECTORY$ repo sync --use-superproject

Bug: https://crbug.com/gerrit/13709
Bug: https://crbug.com/gerrit/13707
Tested-by: Raman Tenneti <rtenneti@google.com>
Change-Id: I7e4b1e51ca1d18b836a5fa8d139a0765262ba500
diff --git a/git_superproject.py b/git_superproject.py
index e2045cf..157a1fb 100644
--- a/git_superproject.py
+++ b/git_superproject.py
@@ -63,7 +63,7 @@
       True if 'git clone <url> <branch>' is successful, or False.
     """
     os.mkdir(self._superproject_path)
-    cmd = ['clone', url, '--filter', 'blob:none']
+    cmd = ['clone', url, '--depth', '1']
     if branch:
       cmd += ['--branch', branch]
     p = GitCommand(None,
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py
index 67a75a1..4012ec2 100644
--- a/tests/test_git_superproject.py
+++ b/tests/test_git_superproject.py
@@ -61,6 +61,13 @@
       with mock.patch.object(self._superproject, '_Clone', return_value=False):
         self._superproject.GetAllProjectsSHAs(url='localhost')
 
+  def test_superproject_get_project_shas_mock_pull(self):
+    """Test with _Pull failing."""
+    with self.assertRaises(GitError):
+      with mock.patch.object(self._superproject, '_Clone', return_value=True):
+        with mock.patch.object(self._superproject, '_Pull', return_value=False):
+          self._superproject.GetAllProjectsSHAs(url='localhost')
+
   def test_superproject_get_project_shas_mock_ls_tree(self):
     """Test with LsTree being a mock."""
     data = ('120000 blob 158258bdf146f159218e2b90f8b699c4d85b5804\tAndroid.bp\x00'