Skip to content

stg refresh hides output of precommit hook #418

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

Closed
larsks opened this issue Feb 16, 2024 · 1 comment
Closed

stg refresh hides output of precommit hook #418

larsks opened this issue Feb 16, 2024 · 1 comment

Comments

@larsks
Copy link
Contributor

larsks commented Feb 16, 2024

Using Stacked Git 2.4.3 (3ff7bc2), I ran into the following behavior:

$ stg refresh
error: `pre-commit` hook returned 1

The pre-commit hook outputs the reason the commit is being rejected, but stg hides it, making it effectively impossible to proceed. The workaround, of course, is to run something like git ci -m '', which shows why the commit was rejected:

yamllint.................................................................Failed
- hook id: yamllint
- exit code: 2

vault/overlays/nerc-ocp-test/vault/vault.yaml
  14:1      warning  comment not indented like content  (comments-indentation)

It would be nice if stg would also expose that information, rather than making me go hunt for it.

@jpgrayson
Copy link
Collaborator

Thanks for writing up this issue, @larsks. It was indeed a regression in StGit 2.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants