def submodule_init(path = Dir.pwd, submodules = FalkorLib.config.git[:submodules], _options = {})
      exit_status  = 1
      git_root_dir = rootdir(path)
      if File.exist?("#{git_root_dir}/.gitmodules")
        unless submodules.empty?
          # TODO: Check if it contains all submodules of the configuration
        end
      end
      #ap FalkorLib.config.git
      Dir.chdir(git_root_dir) do
        exit_status = FalkorLib::Git.submodule_update( git_root_dir )
        submodules.each do |subdir, conf|
          next if conf[:url].nil?
          url = conf[:url]
          dir = "#{FalkorLib.config.git[:submodulesdir]}/#{subdir}"
          branch = (conf[:branch].nil?) ? 'master' : conf[:branch]
          if File.directory?( dir )
            puts "  ... the git submodule '#{subdir}' is already setup."
          else
            info "adding Git submodule '#{dir}' from '#{url}'"
            exit_status = run %(
                           git submodule add -b #{branch} #{url} #{dir}
                           git commit -s -m "Add Git submodule '#{dir}' from '#{url}'" .gitmodules #{dir}
                        )
          end
        end
      end
      exit_status
    end
def submodule_init(path = Dir.pwd, submodules = FalkorLib.config.git[:submodules], _options = {})
      exit_status  = 1
      git_root_dir = rootdir(path)
      if File.exist?("#{git_root_dir}/.gitmodules")
        unless submodules.empty?
          # TODO: Check if it contains all submodules of the configuration
        end
      end
      #ap FalkorLib.config.git
      Dir.chdir(git_root_dir) do
        exit_status = FalkorLib::Git.submodule_update( git_root_dir )
        submodules.each do |subdir, conf|
          next if conf[:url].nil?
          url = conf[:url]
          dir = "#{FalkorLib.config.git[:submodulesdir]}/#{subdir}"
          branch = (conf[:branch].nil?) ? 'master' : conf[:branch]
          if File.directory?( dir )
            puts "  ... the git submodule '#{subdir}' is already setup."
          else
            info "adding Git submodule '#{dir}' from '#{url}'"
            exit_status = run %(
                           git submodule add -b #{branch} #{url} #{dir}
                           git commit -s -m "Add Git submodule '#{dir}' from '#{url}'" .gitmodules #{dir}
                        )
          end
        end
      end
      exit_status
    end
Delete a branch.
 def delete_branch(branch, path = Dir.pwd, opts = { :force => false })
   g = MiniGit.new(path)
   error "'#{branch}' is not a valid existing branch" unless list_branch(path).include?( branch )
   g.branch (opts[:force] ? :D : :d) => "#{branch}"
 end

 Initialize git submodule from the configuration