Class: Rosette::Core::Commands::FetchCommand

Inherits:
GitCommand show all
Includes:
WithRepoName
Defined in:
lib/rosette/core/commands/git/fetch_command.rb

Overview

Performs a git fetch on a repository. New branches and commits will be downloaded from the remote server (often called “origin”) and become part of the local copy.

Examples:

FetchCommand.new(configuration)
  .set_repo_name('my_repo')
  .execute

Instance Attribute Summary

Attributes included from WithRepoName

#repo_name

Attributes inherited from Command

#configuration

Instance Method Summary collapse

Methods included from WithRepoName

#set_repo_name

Methods inherited from GitCommand

#valid?

Methods inherited from Command

#initialize, #messages, #valid?, validate, validators

Constructor Details

This class inherits a constructor from Rosette::Core::Commands::Command

Instance Method Details

#executeJava::OrgEclipseJgitTransport::FetchResult

Perform the fetch operation.

Returns:

  • (Java::OrgEclipseJgitTransport::FetchResult)

20
21
22
# File 'lib/rosette/core/commands/git/fetch_command.rb', line 20

def execute
  get_repo(repo_name).repo.fetch
end