Эх сурвалжийг харах

Honor --depth during repo init

If a user is asking for a shallow clone of the repos, they probably
expect a shallow clone of the manifest repo too. For very large
manifest repos, this can be a huge space and time savings. For one real-world
repo, a 'repo init --no-tags --current-branch' used 350MB of disk space and
took 7 minutes. Adding --depth 1 and this change reduced it to 10MB and 2.5
minutes.

Change-Id: I6fa662e174e623ede8861efc862ce26d65d4958d
Nasser Grainawi 6 жил өмнө
parent
commit
d92464e8ef
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      subcmds/init.py

+ 2 - 2
subcmds/init.py

@@ -197,6 +197,8 @@ to update the working directory files.
       else:
         m.PreSync()
 
+    self._ConfigureDepth(opt)
+
     if opt.manifest_url:
       r = m.GetRemote(m.remote.name)
       r.url = opt.manifest_url
@@ -429,6 +431,4 @@ to update the working directory files.
         self._ConfigureUser()
       self._ConfigureColor()
 
-    self._ConfigureDepth(opt)
-
     self._DisplayResult()