@@ -610,7 +610,7 @@ func (c *Client) getBlobInfo(ctx context.Context, repo *gitalypb.Repository, pat
610610
611611func (c * Client ) GetRepoFileTree (ctx context.Context , req gitserver.GetRepoInfoByPathReq ) ([]* types.File , error ) {
612612 var files []* types.File
613- ctx , cancel := context .WithTimeout (ctx , time . Second * 3 )
613+ ctx , cancel := context .WithTimeout (ctx , c . treeTimeout )
614614 defer cancel ()
615615
616616 req .Path = strings .TrimPrefix (req .Path , "/" )
@@ -757,7 +757,7 @@ func (c *Client) GetRepoFileTree(ctx context.Context, req gitserver.GetRepoInfoB
757757}
758758
759759func (c * Client ) GetTree (ctx context.Context , req types.GetTreeRequest ) (* types.GetRepoFileTreeResp , error ) {
760- ctx , cancel := context .WithTimeout (ctx , time . Second * 3 )
760+ ctx , cancel := context .WithTimeout (ctx , c . treeTimeout )
761761 defer cancel ()
762762
763763 req .Path = strings .TrimPrefix (req .Path , "/" )
@@ -842,7 +842,7 @@ func (c *Client) GetTree(ctx context.Context, req types.GetTreeRequest) (*types.
842842
843843func (c * Client ) GetLogsTree (ctx context.Context , req types.GetLogsTreeRequest ) (* types.LogsTreeResp , error ) {
844844 var resp []* types.CommitForTree
845- ctx , cancel := context .WithTimeout (ctx , time . Second * 3 )
845+ ctx , cancel := context .WithTimeout (ctx , c . treeTimeout )
846846 defer cancel ()
847847
848848 req .Path = strings .TrimPrefix (req .Path , "/" )
@@ -912,7 +912,7 @@ func (c *Client) GetLogsTree(ctx context.Context, req types.GetLogsTreeRequest)
912912
913913func (c * Client ) GetRepoAllFiles (ctx context.Context , req gitserver.GetRepoAllFilesReq ) ([]* types.File , error ) {
914914 var files []* types.File
915- ctx , cancel := context .WithTimeout (ctx , time . Second * 3 )
915+ ctx , cancel := context .WithTimeout (ctx , c . treeTimeout )
916916 defer cancel ()
917917
918918 relativePath , err := c .BuildRelativePath (ctx , req .RepoType , req .Namespace , req .Name )
@@ -955,7 +955,7 @@ func (c *Client) GetRepoAllFiles(ctx context.Context, req gitserver.GetRepoAllFi
955955
956956func (c * Client ) GetRepoAllLfsPointers (ctx context.Context , req gitserver.GetRepoAllFilesReq ) ([]* types.LFSPointer , error ) {
957957 var pointers []* types.LFSPointer
958- ctx , cancel := context .WithTimeout (ctx , time . Second * 3 )
958+ ctx , cancel := context .WithTimeout (ctx , c . treeTimeout )
959959 defer cancel ()
960960
961961 relativePath , err := c .BuildRelativePath (ctx , req .RepoType , req .Namespace , req .Name )
0 commit comments