Top Level Namespace

Defined Under Namespace

Modules: Atlassian

Constant Summary

Constants included from Atlassian::Stash::Git

Atlassian::Stash::Git::DEFAULT_REMOTE

Instance Method Summary collapse

Methods included from Atlassian::Stash::Git

#create_git_alias, #ensure_within_git!, #get_branches, #get_current_branch, #get_remote_url, #get_remotes, #get_repo_root_directory, #is_branch?, #is_in_git_repository?

Methods included from Atlassian::Util::TextUtil

#convert_branch_name_to_sentence, #to_sentence_case

Instance Method Details

#load_configObject



20
21
22
23
24
25
26
# File 'bin/stash', line 20

def load_config
  raise "No Stash configuration found; please run configure" unless File.exists? $configFile
  config = YAML.load_file($configFile)
  raise "Stash configuration file is incomplete, please re-run configure" unless config['username'] and config['stash_url']
  config.merge! repo_config if repo_config
  config
end

#repo_configObject



28
29
30
31
32
33
34
35
36
37
38
# File 'bin/stash', line 28

def repo_config
  return @repo_config if @repo_config

  repo_root = get_repo_root_directory.strip
  repo_directory = Pathname.new(repo_root)
  stash_config = repo_directory + $configFileName
  if (stash_config.exist? && stash_config.file?)
    @repo_config = YAML.load_file(stash_config)
  end
  Hash.new
end