File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,19 @@ def check_federatedcode_configured_and_available(logger=None):
145145 logger ("Federatedcode repositories are configured and available." )
146146
147147
148- def clone_repository (repo_url , logger = None ):
148+ def clone_repository (repo_url , full_history = False , logger = None ):
149149 """Clone repository to local_path."""
150150 local_dir = tempfile .mkdtemp ()
151151
152152 authenticated_repo_url = repo_url .replace (
153153 "https://" ,
154154 f"https://{ settings .FEDERATEDCODE_GIT_SERVICE_TOKEN } @" ,
155155 )
156- repo = Repo .clone_from (url = authenticated_repo_url , to_path = local_dir , depth = 1 )
156+
157+ if full_history :
158+ repo = Repo .clone_from (url = authenticated_repo_url , to_path = local_dir )
159+ else :
160+ repo = Repo .clone_from (url = authenticated_repo_url , to_path = local_dir , depth = 1 )
157161
158162 repo .config_writer (config_level = "repository" ).set_value (
159163 "user" , "name" , settings .FEDERATEDCODE_GIT_SERVICE_NAME
You can’t perform that action at this time.
0 commit comments