[ 
https://jira.codehaus.org/browse/SCM-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335106#comment-335106
 ] 

Tomasz Krakowiak commented on SCM-530:
--------------------------------------

I would like to implement support of submodules in git scm providers.
This is what I think it should be implemented (pseudocode):
{code}
checkin(repository, fileSet, options){
  gitmodules = listGitSubmodules();// Non-recursive
  for(gitmodule : gitmodules){
    moduleFileSet = narrowFileSetToModule(repository, gitmodule, fileset); // 
Returns subset of files narrowed
                                                                           // 
to those contained in module's directory.
                                                                           // 
(relative paths are resolved to absolute
                                                                           // 
paths or relative to module's directory)
    if(!isEmpty(moduleFileSet)){
      if(!isSubmoduleInitialized(repository, gitmodule)){
        return "Git submodule " + gitmodule + "is not initialized";
      }
      moduleRepository = submoduleRepository(repository, submodule);
      result = checkin(moduleRepository, moduleFileSet, options);
      if(!isSuccess(result)){
        return result;
      }
      fileSet.add(submodule);
    }
  }
  ... // Do the same thing as currently.
}
{code}
I'm only worried about using scm connection for submodules not configured in 
pom. Still everything should work as long everything is properly configured in 
git (i would not recommend providing submodule url overriding).
                
> Add support for git submodules to git SCM provider
> --------------------------------------------------
>
>                 Key: SCM-530
>                 URL: https://jira.codehaus.org/browse/SCM-530
>             Project: Maven SCM
>          Issue Type: New Feature
>          Components: maven-scm-provider-git
>    Affects Versions: 1.3
>            Reporter: Chas Emerick
>
> Pretty self-explanatory.  Example fallout of this issue: release:perform on a 
> project that refers to other git repos as submodules cannot succeed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to