Set useNativeGit in git-commit-id-plugin#11365
Conversation
hashhar
left a comment
There was a problem hiding this comment.
Thank you. I too use worktrees a lot.
Is it possible to enable it only when not on CI though? IIRC the executable adds considerable overhead. But maybe overhead isn't so bad since IIRC @nineinchnick recently changed to make the plugin run only once instead of per-module?
|
Yes, I was worried about CI as well, though first I wanted to see if it works there at all (hence the draft status) :) If this plugin runs only once, then probably Maven has way larger overhead than executing a native binary, though. |
|
Can you time it to see if there's a difference at all? |
We can wait and see once the build passes. But I don't think we can make any meaningful measurements. Anyway, I could add this, just in case: Author: Krzysztof Sobolewski <krzysztof.sobolewski@starburstdata.com>
Date: Tue Mar 8 11:23:53 2022 +0100
fixup! Set useNativeGit in git-commit-id-plugin
diff --git a/pom.xml b/pom.xml
index f5663e9084..4303a4c5c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1928,5 +1928,26 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>disable-git-worktree-workaround-in-ci</id>
+ <activation>
+ <property>
+ <name>env.CONTINUOUS_INTEGRATION</name>
+ </property>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>pl.project13.maven</groupId>
+ <artifactId>git-commit-id-plugin</artifactId>
+ <configuration>
+ <useNativeGit>false</useNativeGit>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
</profiles>
</project> |
9acf88b to
30e680d
Compare
|
I don't expect any difference at all either, but it would be nice to check before merging :-) |
Welcome to https://scans.gradle.com/#maven. BTW I don't notice noticeable performance difference. (Probably because |
The CI should ensure things work, also for engineers. |
This is a workaround for inability to build Trino in a git worktree. This is a long-standing issue in the plugin, see git-commit-id/git-commit-id-maven-plugin#215.
30e680d to
a5f7e57
Compare
Description
This is a workaround for inability to build Trino in a git worktree. This is a long-standing issue in the plugin, see git-commit-id/git-commit-id-maven-plugin#215.
Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) I'm uncertain if this qualifies to release notes. This fixes an annoyance for me, but I'm not sure if it's notable enough for others.
( ) Release notes entries required with the following suggested text: