From 18bb25efa41dab4a3f7619040e2067da3533decd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 24 Jan 2019 21:41:48 +0300 Subject: Add support for --no-progress option --- bdep/git.cxx | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'bdep/git.cxx') 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 -- cgit v1.1