github.com/jingweno/gh@v2.1.1-0.20221007190738-04a7985fa9a1+incompatible/features/submodule_add.feature (about) 1 Feature: hub submodule add 2 Background: 3 Given I am in "dotfiles" git repo 4 # make existing repo in subdirectory so git clone isn't triggered 5 Given a git repo in "vendor/grit" 6 7 Scenario: Add public submodule 8 When I successfully run `hub submodule add mojombo/grit vendor/grit` 9 Then the "vendor/grit" submodule url should be "git://github.com/mojombo/grit.git" 10 And the output should contain exactly: 11 """ 12 Adding existing repo at 'vendor/grit' to the index\n 13 """ 14 15 Scenario: Add private submodule 16 When I successfully run `hub submodule add -p mojombo/grit vendor/grit` 17 Then the "vendor/grit" submodule url should be "git@github.com:mojombo/grit.git" 18 19 Scenario: Add submodule with arguments 20 When I successfully run `hub submodule add -b foo --name grit mojombo/grit vendor/grit` 21 Then "git submodule add -b foo --name grit git://github.com/mojombo/grit.git vendor/grit" should be run 22 23 Scenario: Add submodule with branch 24 When I successfully run `hub submodule add --branch foo mojombo/grit vendor/grit` 25 Then "git submodule add --branch foo git://github.com/mojombo/grit.git vendor/grit" should be run