aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-10-09 21:38:45 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-10-09 21:38:45 +0300
commit0710d41d9bca93c3d045242859dbe74aa12e93f7 (patch)
tree261382598bb4e4675043bfa9ea1d4e7889b955cf
parent019313915d5de12d7402db57df4a38f0cf778a33 (diff)
Print git-cat-file command line used to query symlink target on verbosity level 3
-rw-r--r--bpkg/fetch-git.cxx24
1 files changed, 19 insertions, 5 deletions
diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx
index 5d2e5fe..c283626 100644
--- a/bpkg/fetch-git.cxx
+++ b/bpkg/fetch-git.cxx
@@ -119,7 +119,8 @@ namespace bpkg
template <typename O, typename E, typename... A>
static process
- start_git (const common_options& co,
+ start_git (uint16_t verbosity,
+ const common_options& co,
O&& out,
E&& err,
A&&... args)
@@ -162,7 +163,8 @@ namespace bpkg
// We assume that non-sanitized git environment can't harm this call.
//
- process pr (start_git (co,
+ process pr (start_git (2 /* verbosity */,
+ co,
pipe, 2 /* stderr */,
co.git_option (),
"rev-parse",
@@ -231,9 +233,10 @@ namespace bpkg
ep = "--exec-path=" + pp.effect.directory ().string ();
#endif
- return process_start_callback ([] (const char* const args[], size_t n)
+ return process_start_callback ([verbosity] (const char* const args[],
+ size_t n)
{
- if (verb >= 2)
+ if (verb >= verbosity)
print_process (args, n);
},
0 /* stdin */, out, err,
@@ -247,6 +250,16 @@ namespace bpkg
}
}
+ template <typename O, typename E, typename... A>
+ inline static process
+ start_git (const common_options& co,
+ O&& out,
+ E&& err,
+ A&&... args)
+ {
+ return start_git (2 /* verbosity */, co, out, err, forward<A> (args)...);
+ }
+
// Run git process, optionally suppressing progress.
//
template <typename... A>
@@ -2569,7 +2582,8 @@ namespace bpkg
path tp;
fdpipe pipe (open_pipe ());
- process pr (start_git (co,
+ process pr (start_git (3 /* verbosity */,
+ co,
pipe, 2 /* stderr */,
co.git_option (),
"-C", dir,