nix-gh/src/libexpr/primops/fetchgit.hh
Eelco Dolstra 72cd52c3cd
builtins.fetchgit: Support importing a working tree
For example, you can write

  src = fetchgit ./.;

and if ./. refers to an unclean working tree, that tree will be copied
to the Nix store. This removes the need for "cleanSource".
2017-10-30 19:59:25 +01:00

25 lines
388 B
C++

#pragma once
#include <string>
#include "util.hh"
namespace nix {
class Store;
struct GitInfo
{
Path storePath;
std::string rev;
std::string shortRev;
uint64_t revCount = 0;
};
GitInfo exportGit(ref<Store> store, const std::string & uri,
std::experimental::optional<std::string> ref = {},
const std::string & rev = "",
const std::string & name = "");
}