Closed bodote closed 2 months ago
I can reproduce the error also on MacOS. You can use this project to reproduce the problem:
git@github.com:bodote/mongo_change_stream.git (ignore that this project was actually about mongo_change_streams)
Once you have this project on your local machine:
mvn spotless:apply
git branch feature1
git worktree add ../feature1-worktree feature1
cd ../feature1-worktree
mvn spotless:apply
Workaround: don't use <ratchetFrom>...</ratchetFrom>
If you are submitting a bug, please include the following:
[ x] summary of problem a spring - boot project with maven and this pom.xml, on a git worktree com.diffplug.spotless:spotless-maven-plugin:2.43.0:check does not work at all with
<ratchetFrom>branch-name</ratchetFrom>
:Cannot find git repository in any parent directory
[ x] Gradle or Maven version: Apache Maven 3.8.6
[ x] spotless version : com.diffplug.spotless:spotless-maven-plugin:2.43.0:check
[x ] operating system and version: windows 11 including latest patches
[x ] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
[ x] copy-paste the full content of any console errors emitted by
gradlew spotless[Apply/Check] --stacktrace
If you're just submitting a feature request or question, no need for the above.