aboutsummaryrefslogtreecommitdiff
path: root/bdep/git.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-24 21:41:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-25 15:16:58 +0300
commit18bb25efa41dab4a3f7619040e2067da3533decd (patch)
tree822bd06dd0a9d5568c14862592d310fec1012b58 /bdep/git.cxx
parenta4dabaa6db8806f23bb7d7bdbb95cab456ef3a73 (diff)
Add support for --no-progress option
Diffstat (limited to 'bdep/git.cxx')
-rw-r--r--bdep/git.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/bdep/git.cxx b/bdep/git.cxx
index 311a557..91964aa 100644
--- a/bdep/git.cxx
+++ b/bdep/git.cxx
@@ -257,22 +257,24 @@ namespace bdep
// git-status --porcelain=2 (available since git 2.11.0) gives us all the
// information with a single invocation.
//
- process pr;
+ fdpipe pipe (open_pipe ()); // Text mode seems appropriate.
+
+ process pr (start_git (semantic_version {2, 11, 0},
+ repo,
+ 0 /* stdin */,
+ pipe /* stdout */,
+ 2 /* stderr */,
+ "status",
+ "--porcelain=2",
+ "--branch"));
+
+ // Shouldn't throw, unless something is severely damaged.
+ //
+ pipe.out.close ();
+
bool io (false);
try
{
- fdpipe pipe (fdopen_pipe ()); // Text mode seems appropriate.
-
- pr = start_git (semantic_version {2, 11, 0},
- repo,
- 0 /* stdin */,
- pipe /* stdout */,
- 2 /* stderr */,
- "status",
- "--porcelain=2",
- "--branch");
-
- pipe.out.close ();
ifdstream is (move (pipe.in), fdstream_mode::skip, ifdstream::badbit);
// Lines starting with '#' are headers (come first) with any other line