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

major: Use git cli instead of grgit #111

Merged
merged 3 commits into from
Oct 6, 2024
Merged

major: Use git cli instead of grgit #111

merged 3 commits into from
Oct 6, 2024

Conversation

ajoberstar
Copy link
Owner

grgit is not really necessary for this plugin, decoupling it will improve a lot of things.

The expectation is for behavior equivalence, but I expect there will be some quirks from switching so this is considered a major version.

@ajoberstar ajoberstar force-pushed the no-grgit branch 3 times, most recently from 5d9bad2 to 185703d Compare October 6, 2024 04:20
grgit is not really necessary for this plugin, decoupling it will
improve a lot of things.

The expectation is for behavior equivalence, but I expect there will be
some quirks from switching so this is considered a major version.
@ajoberstar ajoberstar marked this pull request as ready for review October 6, 2024 04:29
@ajoberstar ajoberstar merged commit 381a2d1 into main Oct 6, 2024
1 check passed
@ajoberstar ajoberstar deleted the no-grgit branch October 6, 2024 04:29
@ciscoo
Copy link

ciscoo commented Oct 18, 2024

I think this change will help in resolving an issue I'm having internally at my company. Currently, publishing our documentation fails with an unhelpful error:

* What went wrong:
Execution failed for task ':documentation:gitPublishPush'.
  > org.ajoberstar.grgit.PushException: Failed to push: refs/heads/gh-pages to refs/heads/gh-pages (pre-receive hook declined)

JGit doesn't support several Git hooks and currently, any error raised is lost. Enabling debug logs for JGit also doesn't help either:

[DEBUG] [org.eclipse.jgit.transport.PacketLineIn] git< unpack ok
[DEBUG] [org.eclipse.jgit.transport.PacketLineIn] git< ng refs/heads/gh-pages pre-receive hook declined
[DEBUG] [org.eclipse.jgit.transport.PacketLineIn] git< 0000

We use owasp/sedated which is a pre-receive hook. It is a bit of a pain to figure out what is being blocked when the only log from JGit doesn't provide any information.

By using the git CLI directly, this should surface the error and anything else really which should help.

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

Successfully merging this pull request may close these issues.

2 participants