[
https://issues.apache.org/jira/browse/SCM-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963719#comment-17963719
]
ASF GitHub Bot commented on SCM-932:
------------------------------------
jira-importer opened a new issue, #1160:
URL: https://github.com/apache/maven-scm/issues/1160
**[Alex
Harui](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aharui)**
opened
**[SCM-932](https://issues.apache.org/jira/browse/SCM-932?redirect=false)** and
commented
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`
```java
repo-root/pom.xml
repo-root/unparented-submodule/pom.xml
```
The user does:
```java
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.
---
**Affects:** 1.11.2
**Attachments:**
-
[SCM-932.patch](https://issues.apache.org/jira/secure/attachment/12999203/SCM-932.patch)
(_2.65 kB_)
-
[SCM-932-Test.patch](https://issues.apache.org/jira/secure/attachment/12999202/SCM-932-Test.patch)
(_3.34 kB_)
**Issue Links:**
- [SCM-807](https://issues.apache.org/jira/browse/SCM-807) JGit impl
check-in fails unless the Maven project is in the working copy root
(_**"duplicates"**_)
**Remote Links:**
- [GitHub Pull Request #96
](https://github.com/apache/maven-scm/pull/96)
> JGit does not commit files in fileset based in subfolder
> --------------------------------------------------------
>
> Key: SCM-932
> URL: https://issues.apache.org/jira/browse/SCM-932
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-jgit
> Affects Versions: 1.11.2
> Reporter: Alex Harui
> Priority: Major
> Attachments: SCM-932-Test.patch, SCM-932.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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`
> {code:java}
> repo-root/pom.xml
> repo-root/unparented-submodule/pom.xml {code}
> The user does:
> {code:java}
> cd repo-root/unparented-submodule
> mvn release:prepare {code}
> 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.
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)