KiCad PCB EDA Suite
Loading...
Searching...
No Matches
git_init_handler.h File Reference
#include <git/git_repo_mixin.h>
#include <import_export.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  RemoteConfig
 
class  GIT_INIT_HANDLER
 

Enumerations

enum class  InitResult { Success , AlreadyExists , Error }
 

Functions

APIEXPORT void ApplyKicadGitConventions (const wxString &aProjectPath)
 Apply KiCad's standard repo conventions to a project directory:
 

Enumeration Type Documentation

◆ InitResult

enum class InitResult
strong
Enumerator
Success 
AlreadyExists 
Error 

Definition at line 27 of file git_init_handler.h.

Function Documentation

◆ ApplyKicadGitConventions()

APIEXPORT void ApplyKicadGitConventions ( const wxString & aProjectPath)

Apply KiCad's standard repo conventions to a project directory:

  • seed .gitignore with KiCad-generated paths
  • seed .gitattributes with merge=kicad-* lines so the in-process libgit2 drivers and external git merge both route design files
  • configure repo-local merge.kicad-*.driver / mergetool.kicad.cmd pointing at the kicad-cli binary alongside the running process

Each step is append-only: existing user content is preserved, never overwritten. Safe to call repeatedly. Used by both GIT_INIT_HANDLER (after init) and GIT_CLONE_HANDLER (after clone) so freshly-cloned repos get the same setup as freshly-init'd ones.

Definition at line 333 of file git_init_handler.cpp.

References ensureMergeDriverConfig(), ensureProjectGitattributes(), and ensureProjectGitignore().

Referenced by GIT_INIT_HANDLER::InitializeRepository(), and GIT_CLONE_HANDLER::PerformClone().