From 07fdebdbb02fde71d6e656ddd46b967347417502 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 9 Jul 2018 09:48:07 +0200 Subject: Implement publish command for publishing packages to archive repositories --- bdep/git.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 bdep/git.hxx (limited to 'bdep/git.hxx') 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 +#include + +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 + optional + git_line (const dir_path& repo, bool ignore_error, A&&... args); +} + +#include + +#endif // BDEP_GIT_HXX -- cgit v1.1