|
KiCad PCB EDA Suite
|
Build a temp working repo with two commits. More...
Public Member Functions | |
| GIT_COMPARE_FIXTURE () | |
| void | writeFile (const wxString &aFile, const wxString &aContent) |
| Write a file in the working tree. | |
| void | removeFile (const wxString &aFile) |
| void | commitAll (const wxString &aMessage) |
| Stage every change, including deletions, and create a commit on HEAD. | |
| git_repository * | repo () const |
| const wxString & | TempPath () const |
| LIBGIT_BACKEND * | Backend () const |
Private Member Functions | |
| void | initRepo () |
Static Private Member Functions | |
| static wxString | toWxString (const std::filesystem::path &aPath) |
Private Attributes | |
| KIGIT::GitRepositoryPtr | m_repo |
| wxString | m_repoPath |
| SCOPED_GIT_BACKEND | m_backend |
| SCOPED_TEMP_DIR | m_tempDir |
| SCOPED_TEMP_DIR | m_configDir |
| SCOPED_GIT_CONFIG_SEARCH_PATH | m_configSearchPath |
| wxString | m_tempPath |
Build a temp working repo with two commits.
The first commit adds a.txt and b.txt. The second modifies a.txt, deletes b.txt and adds c.txt. This lets a compare of HEAD~1..HEAD exercise modified / removed / added deltas.
Definition at line 51 of file test_git_compare_handler.cpp.
|
inline |
Definition at line 53 of file test_git_compare_handler.cpp.
References initRepo(), m_repoPath, and KI_TEST::GIT_TEST_FIXTURE::TempPath().
|
inlineinherited |
Definition at line 97 of file git_test_fixture.h.
References m_backend.
|
inline |
Stage every change, including deletions, and create a commit on HEAD.
Definition at line 74 of file test_git_compare_handler.cpp.
References KI_TEST::CommitAllGitFiles(), and m_repo.
Referenced by initRepo().
|
inlineprivate |
Definition at line 81 of file test_git_compare_handler.cpp.
References commitAll(), KI_TEST::InitGitRepository(), m_repo, m_repoPath, removeFile(), TEST_AUTHOR_EMAIL, TEST_AUTHOR_NAME, and writeFile().
Referenced by GIT_COMPARE_FIXTURE().
|
inline |
Definition at line 67 of file test_git_compare_handler.cpp.
References m_repoPath.
Referenced by initRepo().
|
inline |
Definition at line 77 of file test_git_compare_handler.cpp.
References git_repository, and m_repo.
|
inlineinherited |
Definition at line 96 of file git_test_fixture.h.
References m_tempPath.
Referenced by GIT_BACKEND_FIXTURE::GIT_BACKEND_FIXTURE(), GIT_COMPARE_FIXTURE::GIT_COMPARE_FIXTURE(), GIT_BACKEND_FIXTURE::tempBase(), VCS_TEST_FIXTURE::tempDir(), and VCS_TEST_FIXTURE::VCS_TEST_FIXTURE().
|
inlinestaticprivateinherited |
Definition at line 100 of file git_test_fixture.h.
Referenced by GIT_TEST_FIXTURE().
|
inline |
Write a file in the working tree.
Definition at line 61 of file test_git_compare_handler.cpp.
References m_repoPath, and KI_TEST::WriteGitFile().
Referenced by initRepo().
|
privateinherited |
Definition at line 110 of file git_test_fixture.h.
Referenced by Backend().
|
privateinherited |
Definition at line 112 of file git_test_fixture.h.
Referenced by GIT_TEST_FIXTURE().
|
privateinherited |
Definition at line 113 of file git_test_fixture.h.
Referenced by GIT_TEST_FIXTURE().
|
private |
Definition at line 96 of file test_git_compare_handler.cpp.
Referenced by commitAll(), initRepo(), and repo().
|
private |
Definition at line 97 of file test_git_compare_handler.cpp.
Referenced by GIT_COMPARE_FIXTURE(), initRepo(), removeFile(), and writeFile().
|
privateinherited |
Definition at line 111 of file git_test_fixture.h.
Referenced by GIT_TEST_FIXTURE().
|
privateinherited |
Definition at line 114 of file git_test_fixture.h.
Referenced by GIT_TEST_FIXTURE(), and TempPath().