diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-04-10 22:56:22 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-04-16 16:27:18 +0300 |
commit | bf02b66c61d941a60e45520ef77f677dad36557e (patch) | |
tree | 0d61c6a06e868aeee2d6375a8581f87a47eac5b1 /bdep/git.txx | |
parent | 842b2c6604be98a7f5d05cb674ae121d716eeb64 (diff) |
Add --amend and --squash options to bdep-release
Diffstat (limited to 'bdep/git.txx')
-rw-r--r-- | bdep/git.txx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bdep/git.txx b/bdep/git.txx index 5ff5e6c..f3bedf0 100644 --- a/bdep/git.txx +++ b/bdep/git.txx @@ -89,7 +89,7 @@ namespace bdep template <typename... A> optional<string> - git_line (const semantic_version& min_ver, bool ie, A&&... args) + git_line (const semantic_version& min_ver, bool ie, char delim, A&&... args) { fdpipe pipe (open_pipe ()); auto_fd null (ie ? open_dev_null () : auto_fd ()); @@ -100,7 +100,21 @@ namespace bdep ie ? null.get () : 2 /* stderr */, forward<A> (args)...)); - return git_line (move (pr), move (pipe), ie); + return git_line (move (pr), move (pipe), ie, delim); + } + + template <typename... A> + inline optional<string> + git_line (const semantic_version& min_ver, bool ie, A&&... args) + { + return git_line (min_ver, ie, '\n' /* delim */, forward<A> (args)...); + } + + template <typename... A> + inline optional<string> + git_string (const semantic_version& min_ver, bool ie, A&&... args) + { + return git_line (min_ver, ie, '\0' /* delim */, forward<A> (args)...); } template <typename... A> |