From da9cbf29c403d27c2940f9b31199c4648f8ae4a1 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 1 Aug 2019 16:10:48 +0300 Subject: Move version build system module to separate library --- build2/version/snapshot.cxx | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 build2/version/snapshot.cxx (limited to 'build2/version/snapshot.cxx') diff --git a/build2/version/snapshot.cxx b/build2/version/snapshot.cxx deleted file mode 100644 index b43e083..0000000 --- a/build2/version/snapshot.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// file : build2/version/snapshot.cxx -*- C++ -*- -// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#include - -#include - -using namespace std; - -namespace build2 -{ - namespace version - { - snapshot - extract_snapshot_git (const dir_path&); - - static const path git (".git"); - - snapshot - extract_snapshot (const scope& rs) - { - // Ignore errors when checking for existence since we may be iterating - // over directories past any reasonable project boundaries. - // - for (dir_path d (rs.src_path ()); !d.empty (); d = d.directory ()) - { - // .git can be either a directory or a file in case of a submodule. - // - if (butl::entry_exists (d / git, - true /* follow_symlinks */, - true /* ignore_errors */)) - return extract_snapshot_git (d); - } - - return snapshot (); - } - } -} -- cgit v1.1