File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,15 @@ func (storageSession *storageSession) clone(params *RequestMetadataParams) error
185185 URL : params .Repository ,
186186 Auth : auth ,
187187 ReferenceName : ref (params .Ref , false ),
188+ // We only need to know the latest version of branches to be able to commit on top
189+ // of them. And, we don't otherwise use the history of the repository. So, this
190+ // saves a lot data.
191+ // A further improvement that has not been implemented would be to use
192+ // sparse-checkouts to only retrieve only blobs (i.e., files) from the server that
193+ // we actually care about. The depth here prevents performance problems from
194+ // history growth. sparse-checkouts help with horizontal growth (e.g., additional
195+ // systems managed by the repository).
196+ Depth : 1 ,
188197 }
189198
190199 repository , err := git .Clone (storageSession .storer , storageSession .fs , cloneOptions )
You can’t perform that action at this time.
0 commit comments