Sha256: 283c8ac92431761875a150ef728b6e9e95e0e69ff07417acda6636b8d7b0a53f

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

from_project_name = read_project_name
from_repository_name = read_repository_name
to_project_name = read_project_name
to_repository_name = read_repository_name
authorize(from_project_name, 'read')
authorize(to_project_name, 'admin')
from_dir = find_repository_dir(from_project_name, from_repository_name)
to_dir = find_repository_dir(to_project_name, to_repository_name)
forkid = Dir.chdir(from_dir) { `git config --get hubbard.forkid` }
FileUtils.mkdir_p(to_dir)
exit $? unless system "git clone --bare --shared #{from_dir} #{to_dir}" 
Dir.chdir(to_dir) do
  exec "git config hubbard.forkid #{forkid}"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hubbard-0.0.16 commands/fork-repository.rb
hubbard-0.0.15 commands/fork-repository.rb
hubbard-0.0.14 commands/fork-repository.rb
hubbard-0.0.13 commands/fork-repository.rb
hubbard-0.0.12 commands/fork-repository.rb
hubbard-0.0.11 commands/fork-repository.rb
hubbard-0.0.10 commands/fork-repository.rb