axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

JGit sees non-existing changes

Open realdadfish opened this issue 5 years ago • 5 comments

My workspace is clean:

$ LANG=POSIX git status
On branch <my-branch-name>
nothing to commit, working tree clean

Still, when I execute the release command, the plugin / JGit tells me that there are many uncommitted changes:

$ ./gradlew release

> Task :verifyRelease FAILED
Looking for uncommitted changes.. FAILED

Staged changes:

Unstaged changes:
    modified: path/to/File.kt
    ...

This is on Cygwin / Bash, using Axion Plugin 1.10.3 with Git 2.21.0. How can I further track this issue down?

realdadfish avatar Jan 06 '20 15:01 realdadfish

Could you create minimal project, just git repo and build.gradle with axion-release and see how it behaves? I'm trying to find out if its env or repo problem.

adamdubiel avatar Jan 06 '20 19:01 adamdubiel

@adamdubiel The problem persists, minimalist build.gradle:

buildscript {
    repositories {
        maven { url 'https://company/artifactory/jcenter-remote/' }
        maven { url 'https://company/artifactory/maven-remote/' }
    }

    dependencies {
        classpath "pl.allegro.tech.build:axion-release-plugin:1.10.3"
    }
}

apply plugin: 'pl.allegro.tech.build.axion-release'

Then, on ./gradlew release:

 ./gradlew release
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :verifyRelease FAILED
Looking for uncommitted changes.. FAILED

Staged changes:

Unstaged changes:
    modified: gradlew
    modified: gradle/wrapper/gradle-wrapper.jar
    modified: build.gradle
    modified: gradle/wrapper/gradle-wrapper.properties
    modified: gradlew.bat
    modified: gradle.properties
    added: .gradle/5.6.4/executionHistory/executionHistory.lock
    added: .gradle/buildOutputCleanup/buildOutputCleanup.lock
    added: .gradle/buildOutputCleanup/cache.properties
    added: .gradle/5.6.4/fileHashes/fileHashes.lock
    added: .gradle/5.6.4/executionHistory/executionHistory.bin


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':verifyRelease'.

while the workspace is clean. Sidenote: .gradle/ is untracked and not ignored, still, JGit tracks it as added.

realdadfish avatar Jan 07 '20 17:01 realdadfish

@realdadfish hey, is this issue still occurs with newest axion release?

kkocel avatar Jul 10 '21 15:07 kkocel

Haven't looked for this issue in quite some time, sorry, cannot say if this is still an issue or not ATM.

realdadfish avatar Jul 12 '21 13:07 realdadfish

This is still an issue with 1.13.6 / Gradle 7.2:

$ git status
On branch my/private-branch
nothing to commit, working tree clean
$ gradle release
> Task :verifyRelease FAILED
Looking for uncommitted changes.. FAILED

Staged changes:

Unstaged changes:
    removed:  path/to/some.RoomDatabase/1.json

JGit is unfortunately not very well maintained, I have at least one other problem regarding Git Worktrees that I have to work-around.

realdadfish avatar Nov 29 '21 17:11 realdadfish