Sha256: 22d9a5bf3ef80431ae61eb582c55ea8f2f83f2812ce37348da9eff9096b0a2b9

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 Bytes

Contents

module GitBundle
  module Commands
    class Generate
      include GitBundle::Console

      def initialize(project, args)
        @project = project
        @args = args
      end

      def invoke
        @project.load_dependant_repositories
        @project.dependant_repositories.each { |repo| @project.branch_config.current[repo.name] = remote_branch_reference(repo) }
        @project.branch_config.save
      end

      def remote_branch_reference(repository)
        if repository.remote
          "#{repository.remote} #{repository.branch}"
        else
          repository.branch
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git-bundle-1.0.20 lib/git_bundle/commands/generate.rb
git-bundle-1.0.19 lib/git_bundle/commands/generate.rb
git-bundle-1.0.18 lib/git_bundle/commands/generate.rb