1616from pydantic import BaseModel , ConfigDict , Field
1717from pydantic import ValidationError as PydanticValidationError
1818
19- from infrahub import config
2019from infrahub .core .branch import Branch
2120from infrahub .core .constants import InfrahubKind , RepositoryOperationalStatus , RepositorySyncStatus
2221from infrahub .core .registry import registry
@@ -407,7 +406,6 @@ async def create_locally(
407406 except GitCommandError as exc :
408407 await self ._raise_enriched_error (error = exc , branch_name = checkout_ref or self .default_branch )
409408
410- self .create_repo_config (repo )
411409 self .has_origin = True
412410
413411 # Create a worktree for the commit in the default branch
@@ -419,13 +417,6 @@ async def create_locally(
419417
420418 return True
421419
422- @staticmethod
423- def create_repo_config (repo : Repo ) -> None :
424- if config .SETTINGS .git .user_name and config .SETTINGS .git .user_email :
425- with repo .config_writer () as git_config :
426- git_config .set_value ("user" , "name" , config .SETTINGS .git .user_name )
427- git_config .set_value ("user" , "email" , config .SETTINGS .git .user_email )
428-
429420 def has_worktree (self , identifier : str ) -> bool :
430421 """Return True if a worktree with a given identifier already exist."""
431422
0 commit comments