GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(plugin-gradle): Try to locate the git system config without executing any processes by zml2008 · Pull Request #2514 · diffplug/spotless

Conversation

@zml2008

@zml2008 zml2008 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

While it's not possible to match git's behavior exactly, this attempts to read the system gitconfig correcting a regression from 6.21.0 to 6.22.0.

This is a pretty ugly "fix" for the issue -- I came to this approach after trying to use Gradle's ExecOperations to wrap calls out to git, which failed since the subprocess creation happens at configuration time. Looking at git's logic to locate a system config file, this implementation is close-ish -- git's behaviour is determined by some compile-time flags, so to get exact behaviour we would have to call out to the actual git implementation. I'd love to see a better approach, but this is where I got after an afternoon of poking around so I thought I'd toss it up.

Fixes #2404

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@zml2008
fix(plugin-gradle): Try to locate the git system config without execu…
50cb0e3
…ting any processes

While it's not possible to match cgit's behavior exactly, this
attempts to read the system gitconfig correcting a regression from 6.21.0 to 6.22.0.

Fixes diffplug#2404
@nedtwigg

nedtwigg commented Jul 16, 2025

Copy link
Copy Markdown
Member
  • Sorry this has been stuck. We are about to bump our minimums Bump the min Gradle and Java requirements to 7.3 and 17 #2540
  • This will allow us to bump our JGit from its current 6.10.1.202505221210-r to its latest 7.3.0.202506031305-r
  • I think this might make the fix in this PR unnecessary
  • If I'm wrong about that then I'll look at this more carefully and merge it
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg nedtwigg mentioned this pull request Jul 21, 2025
fix(deps): update dependency org.eclipse.jgit:org.eclipse.jgit to v7 #2257
Merged
1 task
@nedtwigg
Merge branch 'main' into fix/jgit-system-config
b2e71f4
@nedtwigg

nedtwigg commented Jul 21, 2025

Copy link
Copy Markdown
Member

I was wrong, updating to JGit 7.3 did not solve our problems. Assuming that CI passes I'll merge this in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg
Merge branch 'main' into fix/jgit-system-config
2921626
@zml2008

zml2008 commented Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg
nedtwigg merged commit 9bc702f into diffplug:main Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Investigate git-diff windows line ending issues in Spotless 7.0+

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@zml2008 @nedtwigg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.