From bf02b66c61d941a60e45520ef77f677dad36557e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 10 Apr 2019 22:56:22 +0300 Subject: Add --amend and --squash options to bdep-release --- bdep/git.hxx | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'bdep/git.hxx') diff --git a/bdep/git.hxx b/bdep/git.hxx index e699947..c674926 100644 --- a/bdep/git.hxx +++ b/bdep/git.hxx @@ -31,6 +31,19 @@ namespace bdep I&& in, O&& out, E&& err, A&&... args); + template + inline process + start_git (const semantic_version& min_ver, + dir_path& repo, + I&& in, O&& out, E&& err, + A&&... args) + { + return start_git (min_ver, + const_cast (repo), + forward (in), forward (out), forward (err), + forward (args)...); + } + // Wait for git process to terminate. // void @@ -70,7 +83,23 @@ namespace bdep // redirected output pipe. // optional - git_line (process&& pr, fdpipe&& pipe, bool ignore_error); + git_line (process&&, fdpipe&&, bool ignore_error, char delim = '\n'); + + // Similar to git_line() functions but return the complete git output. + // + template + optional + git_string (const semantic_version&, bool ignore_error, A&&... args); + + template + optional + git_string (const semantic_version&, + const dir_path& repo, + bool ignore_error, + A&&... args); + + optional + git_string (process&&, fdpipe&&, bool ignore_error); // Try to derive a remote HTTPS repository URL from the optionally specified // custom git config value falling back to remote.origin.build2Url and then -- cgit v1.1