Enable fetching from local git bundle

This commit is contained in:
Mislav Marohnić 2016-01-22 21:13:45 +11:00
Родитель c3ddec3248
Коммит 1d519fe496
2 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -53,7 +53,7 @@ func tranformFetchArgs(args *Args) error {
projects := make(map[*github.Project]bool)
ownerRegexp := regexp.MustCompile(OwnerRe)
for _, name := range names {
if ownerRegexp.MatchString(name) {
if ownerRegexp.MatchString(name) && !isCloneable(name) {
_, err := localRepo.RemoteByName(name)
if err != nil {
project := github.NewProject(name, "", "")

Просмотреть файл

@ -6,9 +6,20 @@ Feature: hub fetch
Scenario: Fetch existing remote
When I successfully run `hub fetch origin`
Then "git fetch origin" should be run
Then the git command should be unchanged
And there should be no output
Scenario: Fetch from local bundle
Given the GitHub API server:
"""
get('/repos/mislav/dotfiles') { json :private => false }
"""
And a git bundle named "mislav"
When I successfully run `hub fetch mislav`
Then the git command should be unchanged
And there should be no output
And there should be no "mislav" remote
Scenario: Creates new remote
Given the GitHub API server:
"""
@ -95,5 +106,5 @@ Feature: hub fetch
get('/repos/mislav/dotfiles') { status 404 }
"""
When I successfully run `hub fetch mislav`
Then "git fetch mislav" should be run
Then the git command should be unchanged
And there should be no "mislav" remote