Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message from git is hidden when a git command fails #100

Open
gpshead opened this issue Nov 4, 2023 · 0 comments
Open

Error message from git is hidden when a git command fails #100

gpshead opened this issue Nov 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@gpshead
Copy link
Member

gpshead commented Nov 4, 2023

running cherry_picker 2.2.0 for a 3.12 backport, I get subprocess.CalledProcessError: Command '['git', 'log', '--format=%H', '3.12..']' returned non-zero exit status 128. and nothing else.

I'm left to manually recreate that command line and run it myself to try and figure out what git's damage is. Running git I see fatal: ambiguous argument '3.12..': unknown revision or path not in the working tree. which is better at least, but still not wholly informative (of course it isn't, git is [censored])...

(the real source of my error is likely what shows up when I try this:)

$ git checkout 3.12
error: pathspec '3.12' did not match any file(s) known to git
hint: '3.12' matched more than one remote tracking branch.
...

When git fails, we should at least let git speak for itself (regardless of utility) and not swallow the git error output.

@gpshead gpshead added the enhancement New feature or request label Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant