blob: add721efd5ec1788a141087d25d5762b6d27d96f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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&);
}
|