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 — Git ratcheting causes exception to be thrown when using git worktrees · Issue #2728 · diffplug/spotless

Git ratcheting causes exception to be thrown when using git worktrees #2728

New issue
Copy link
New issue
Copy link
Closed
#2779
Closed
Git ratcheting causes exception to be thrown when using git worktrees#2728
#2779
Copy link
Labels
bug

Description

@tomakehurst
tomakehurst
opened on Nov 17, 2025
Issue body actions

To reproduce:

  1. Clone https://github.com/wiremock/wiremock
  2. Create a worktree e.g. git add worktree ../my-worktree
  3. cd ../my-worktree
  4. ./gradlew check

The following exception is thrown:

Caused by: java.lang.IllegalArgumentException: Cannot find git repository in any parent directory
        at com.diffplug.spotless.extra.GitRatchet.repositoryFor(GitRatchet.java:151)
        at com.diffplug.spotless.extra.GitRatchet.rootTreeShaOf(GitRatchet.java:173)
        at com.diffplug.gradle.spotless.SpotlessTask.setupRatchet(SpotlessTask.java:95)
        at com.diffplug.gradle.spotless.FormatExtension.setupTask(FormatExtension.java:1077)
        at com.diffplug.gradle.spotless.JavaExtension.setupTask(JavaExtension.java:454)
        at com.diffplug.gradle.spotless.SpotlessExtensionImpl.lambda$createFormatTasks$6(SpotlessExtensionImpl.java:70)
        at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:66)
        at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:66)
        at org.gradle.internal.code.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:124)
        at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:110)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:30)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:27)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:48)
        at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:107)
        at org.gradle.internal.ImmutableActionSet$SetWithManyActions.execute(ImmutableActionSet.java:329)
        at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:280)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection.doAdd(DefaultNamedDomainObjectCollection.java:125)
        at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:1008)

Activity

  1. nedtwigg
    added
    bug
    on Nov 18, 2025
  2. kevinburkesegment
    added a commit that references this issue on Dec 3, 2025

    [fix] Add git worktree support for ratchet functionality

    This issue will close once commit 7cf749c is merged into the 'main' branch.
    7cf749c
  3. kevinburkesegment
    added a commit that references this issue on Jan 21, 2026

    [fix] Add git worktree support for ratchet functionality

    This issue will close once commit 806426a is merged into the 'main' branch.
    806426a
  4. nedtwigg
    closed this as completedin 806426aon Jan 22, 2026
  5. nedtwigg
    added a commit that references this issue on Jan 22, 2026

    [fix] Add git worktree support for ratchet functionality (#2779 fixes #…

    This issue will close once commit 5d802a8 is merged into the 'main' branch.
    5d802a8
  6. tomakehurst commented on Jan 22, 2026

    @tomakehurst
    tomakehurst
    on Jan 22, 2026
    Author
    More actions

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.