Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-932

JGit does not commit files in fileset based in subfolder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.11.2
    • None
    • None

    Description

      If `mvn release` is run in a subfolder, the changed files are relative to the subfolder and not the repo root and `maven-scm-provider-jgit` does not compute the correct path and thus the files are not added and committed.

      For example, a git repo is created at `repo-root`

      repo-root/pom.xml
      repo-root/unparented-submodule/pom.xml 

      The user does:

      cd repo-root/unparented-submodule
      mvn release:prepare 

      A `git status` will show that `unparented-submodule/pom.xml` is changed and not staged for commit.  That's because the fileset's basedir is `unpainted-submodule` and the relative path is just `pom.xml`. `maven-scm-provider-jgit` 1.12.1 tries to stage 'pom.xml' not `unparented-submodule/pom.xml` and since repo-root/pom.xml has not changed, nothing is in the commit and `unparented-submodule/pom.xml` remains un-staged.

       

       

       

       

      Attachments

        1. SCM-932.patch
          3 kB
          Alex Harui
        2. SCM-932-Test.patch
          3 kB
          Alex Harui

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aharui Alex Harui
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m