aboutsummaryrefslogtreecommitdiff
path: root/libbutl/git.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-09-28 19:24:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-09-28 20:29:59 +0300
commitdf1ef68cd8e8582724ce1192bfc202e0b9aeaf0c (patch)
treeb731ca4c68e60c00c7e7d499dbf4868ee7b71f44 /libbutl/git.hxx
parent7a4fc37f264cdb67f2f83fa92703c869215bbc86 (diff)
Get rid of C++ modules related code and rename *.mxx files to *.hxx
Diffstat (limited to 'libbutl/git.hxx')
-rw-r--r--libbutl/git.hxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/libbutl/git.hxx b/libbutl/git.hxx
new file mode 100644
index 0000000..add721e
--- /dev/null
+++ b/libbutl/git.hxx
@@ -0,0 +1,27 @@
+// file : libbutl/git.hxx -*- C++ -*-
+// license : MIT; see accompanying LICENSE file
+
+#pragma once
+
+#include <string>
+
+#include <libbutl/path.hxx>
+#include <libbutl/optional.hxx>
+#include <libbutl/semantic-version.hxx>
+
+#include <libbutl/export.hxx>
+
+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<semantic_version>
+ git_version (const std::string&);
+}