pass stderr in verbose mode from running git commands?
See original GitHub issuee.g.
diff --git a/versioneer.py b/versioneer.py
index a48dcce97..da5916f23 100644
--- a/versioneer.py
+++ b/versioneer.py
@@ -1196,7 +1196,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command):
runner = functools.partial(runner, env=env)
_, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root,
- hide_stderr=True)
+ hide_stderr=not verbose)
if rc != 0:
if verbose:
print("Directory %s not under git control" % root)
since including the fact that I needed -v
for pip install
to see this verbose, took awhile to troubleshoot the need to overcome recent git’s check for safety:
$ sudo git "rev-parse" "--git-dir"
fatal: unsafe repository ('/home/travis/build/datalad/datalad' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /home/travis/build/datalad/datalad
The command "sudo git "rev-parse" "--git-dir"" exited with 128.
in case of installing via sudo
from a local git repo (that is how we test datalad on travis).
More of pains could be shared from https://github.com/datalad/datalad/pull/6913
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Git clone: Redirect stderr to stdout but keep errors being ...
I use this script to run git commands. Since git will write to stderr even ... If the command failed all output is...
Read more >Git - git Documentation
Run as if git was started in <path> instead of the current working directory. When multiple -C options ... Pass a configuration parameter...
Read more >Redirect stdout and stderr to the log only in debug modes - ...
Currently stdout and stderr are redirected to the log file in any case. ... so that in verbose mode many commands are run...
Read more >simple-git
Simple Git. NPM version. A lightweight interface for running git commands in any node.js application. Version 3 - Out Now.
Read more >How to run git commands in verbose mode
How to increase verbosity and run the git commands in debug mode? Environment. Red Hat Enterprise Linux 8; git. Subscriber exclusive content. A ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, right. Sure. Feel free to submit a patch. It seems we activate that with the
verbose
flag insetup.cfg
.someone could indeed do that digging, or just observe that there is a
verbose
option for that function, and thus possibly makes sense to make running of the underlying commands “not hiding errors” if in verbose mode 😉