aboutsummaryrefslogtreecommitdiff
path: root/bdep/git.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-09 09:48:07 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-27 14:23:07 +0300
commit07fdebdbb02fde71d6e656ddd46b967347417502 (patch)
tree594c2f352499aaac0756e3071a4b7ce2aee0fd34 /bdep/git.hxx
parent8a87a8bc08f0d692f53a0373da3a0a959de13e52 (diff)
Implement publish command for publishing packages to archive repositories
Diffstat (limited to 'bdep/git.hxx')
-rw-r--r--bdep/git.hxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/bdep/git.hxx b/bdep/git.hxx
new file mode 100644
index 0000000..f56f38b
--- /dev/null
+++ b/bdep/git.hxx
@@ -0,0 +1,29 @@
+// file : bdep/git.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BDEP_GIT_HXX
+#define BDEP_GIT_HXX
+
+#include <bdep/types.hxx>
+#include <bdep/utility.hxx>
+
+namespace bdep
+{
+ // Return true if the specified directory is a git repository root (contains
+ // the .git filesystem entry).
+ //
+ bool
+ git (const dir_path&);
+
+ // Return the first line of the git output. If ignore_error is true, then
+ // suppress stderr, ignore (normal) error exist status, and return nullopt.
+ //
+ template <typename... A>
+ optional<string>
+ git_line (const dir_path& repo, bool ignore_error, A&&... args);
+}
+
+#include <bdep/git.ixx>
+
+#endif // BDEP_GIT_HXX