[ 
https://issues.apache.org/jira/browse/SCM-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17963604#comment-17963604
 ] 

ASF GitHub Bot commented on SCM-916:
------------------------------------

jira-importer commented on issue #1135:
URL: https://github.com/apache/maven-scm/issues/1135#issuecomment-2964647642

   **[Michael 
Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)**
 commented
   
   No feedback received.
   




> Relative paths are not correctly inferred while creating the command line
> -------------------------------------------------------------------------
>
>                 Key: SCM-916
>                 URL: https://issues.apache.org/jira/browse/SCM-916
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-gitexe
>    Affects Versions: 1.9.4
>            Reporter: Carlo Marchiori
>            Priority: Major
>
> Suppose you have the following situation
> my-proj/pom.xml
> my-proj-child1/pom.xml
> my-proj-child2/pom.xml
> with child my-proj-child1, my-proj-child2 maven modules of root project 
> my-proj.
>  
> Farther suppose using the maven-release-plugin to build a multi-project 
> release starting from my-proj project. The release plugin modifies poms and 
> then tries to check them in. The working directory becomes my-proj and the 
> file collection is 
> [my-proj/pom.xml, my-proj-child1/pom.xml, my-proj-child2/pom.xml]
>  
> But while building the command line and removing the working directory from 
> file paths, the class GitCommandLineUtils in the method addTarget transforms 
> the file list in
> [pom.xml, -child1/pom.xml, -child2/pom.xml]
> which is wrong. The code should check if the prefix is a filesystem parent 
> directory, not just a string prefix.
>  
> The problem gives rise to the following error
> Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: 
> Unable to commit files
> Provider message:
> The git-add command failed.
> Command output:
> fatal: pathspec '-child1\pom.xml' did not match any files
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to