// file : libbutl/git.mxx -*- C++ -*- // license : MIT; see accompanying LICENSE file #ifndef __cpp_modules_ts #pragma once #endif // C includes. #ifndef __cpp_lib_modules_ts #include #endif // Other includes. #ifdef __cpp_modules_ts export module butl.git; #ifdef __cpp_lib_modules_ts import std.core; #endif import butl.path; import butl.optional; import butl.semantic_version; #else #include #include #include #endif #include LIBBUTL_MODEXPORT namespace butl { // Return true if the specified directory is a git repository root (contains // the .git filesystem entry). // LIBBUTL_SYMEXPORT bool git_repository (const dir_path&); // Try to parse the line printed by the 'git --version' command. Return git // version if succeed, nullopt otherwise. // LIBBUTL_SYMEXPORT optional git_version (const std::string&); }