KiCad PCB EDA Suite
Loading...
Searching...
No Matches
text_eval_vcs.cpp File Reference
#include <text_eval/text_eval_vcs.h>
#include <text_eval/text_eval_environment.h>
#include <git/project_git_utils.h>
#include <git/git_backend.h>
#include <git/kicad_git_common.h>
#include <git/kicad_git_memory.h>
#include <string_utils.h>
#include <wx/filename.h>
#include <wx/string.h>
#include <wx/arrstr.h>
#include <algorithm>
#include <map>

Go to the source code of this file.

Namespaces

namespace  TEXT_EVAL_VCS
 VCS (Version Control System) utility functions for text evaluation.
 

Functions

void TEXT_EVAL_VCS::SetContextPath (const wxString &aPath)
 Set the filesystem path used for repository discovery and relative file queries.
 
wxString TEXT_EVAL_VCS::GetContextPath ()
 Return the current context path for repo-scoped VCS queries.
 
bool TEXT_EVAL_VCS::GetContextIsFile ()
 File/directory classification captured when the current context was activated.
 
static std::string TEXT_EVAL_VCS::ReadCommitHash (const std::string &aPath)
 
std::string TEXT_EVAL_VCS::GetCommitHash (const std::string &aPath=".", int aLength=40)
 Get the current HEAD commit identifier (hash).
 
std::string TEXT_EVAL_VCS::GetNearestTag (const std::string &aMatch="", bool aAnyTags=false)
 Get the nearest tag/label from HEAD.
 
int TEXT_EVAL_VCS::GetDistanceFromTag (const std::string &aMatch="", bool aAnyTags=false)
 Get the number of commits since the nearest matching tag.
 
static bool TEXT_EVAL_VCS::ReadIsDirty (bool aIncludeUntracked)
 
bool TEXT_EVAL_VCS::IsDirty (bool aIncludeUntracked=false)
 Check if the repository has uncommitted changes.
 
std::string TEXT_EVAL_VCS::GetAuthor (const std::string &aPath=".")
 Get the author name of the HEAD commit.
 
std::string TEXT_EVAL_VCS::GetAuthorEmail (const std::string &aPath=".")
 Get the author email of the HEAD commit.
 
std::string TEXT_EVAL_VCS::GetCommitter (const std::string &aPath=".")
 Get the committer name of the HEAD commit.
 
std::string TEXT_EVAL_VCS::GetCommitterEmail (const std::string &aPath=".")
 Get the committer email of the HEAD commit.
 
static std::string TEXT_EVAL_VCS::ReadBranch ()
 
std::string TEXT_EVAL_VCS::GetBranch ()
 Get the current branch name.
 
static int64_t TEXT_EVAL_VCS::ReadCommitTimestamp (const std::string &aPath)
 
int64_t TEXT_EVAL_VCS::GetCommitTimestamp (const std::string &aPath=".")
 Get the commit timestamp (Unix time) of the HEAD commit.
 
std::string TEXT_EVAL_VCS::GetCommitDate (const std::string &aPath=".")
 Get the commit date of the HEAD commit as a timestamp string.
 
TEXT_EVAL::ENVIRONMENT::VCS_VALUE TEXT_EVAL_VCS::ReadSource (const TEXT_EVAL::ENVIRONMENT::VCS_KEY &aKey)
 Re-read an owned query descriptor using any active frame memo.