зеркало из https://github.com/mislav/hub.git
Enable fetching from local git bundle
This commit is contained in:
Родитель
c3ddec3248
Коммит
1d519fe496
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче