github.com/echohead/hub@v2.2.1+incompatible/features/cherry_pick.feature (about)

     1  Feature: hub cherry-pick
     2    Background:
     3      Given I am in "git://github.com/rtomayko/ronn.git" git repo
     4      And I am "mislav" on github.com with OAuth token "OTOKEN"
     5  
     6    Scenario: Unchanged
     7      When I run `hub cherry-pick a319d88`
     8      Then the git command should be unchanged
     9  
    10    Scenario: From GitHub commit URL
    11      When I run `hub cherry-pick https://github.com/rtomayko/ronn/commit/a319d88#comments`
    12      Then "git fetch origin" should be run
    13      And "git cherry-pick a319d88" should be run
    14  
    15    Scenario: From fork that has existing remote
    16      Given the "mislav" remote has url "git@github.com:mislav/ronn.git"
    17      When I run `hub cherry-pick https://github.com/mislav/ronn/commit/a319d88`
    18      Then "git fetch mislav" should be run
    19      And "git cherry-pick a319d88" should be run
    20  
    21    Scenario: Using GitHub owner@SHA notation
    22      Given the "mislav" remote has url "git@github.com:mislav/ronn.git"
    23      When I run `hub cherry-pick mislav@a319d88`
    24      Then "git fetch mislav" should be run
    25      And "git cherry-pick a319d88" should be run
    26  
    27    Scenario: Using GitHub owner@SHA notation that is too short
    28      When I run `hub cherry-pick mislav@a319`
    29      Then the git command should be unchanged
    30  
    31    Scenario: Unsupported GitHub owner/repo@SHA notation
    32      When I run `hub cherry-pick mislav/ronn@a319d88`
    33      Then the git command should be unchanged
    34  
    35    Scenario: Skips processing if `-m/--mainline` is specified
    36      When I run `hub cherry-pick -m 42 mislav@a319d88`
    37      Then the git command should be unchanged
    38      When I run `hub cherry-pick --mainline 42 mislav@a319d88`
    39      Then the git command should be unchanged
    40  
    41    Scenario: Using GitHub owner@SHA notation with remote add
    42      When I run `hub cherry-pick mislav@a319d88`
    43      Then "git remote add -f mislav git://github.com/mislav/ronn.git" should be run
    44      And "git cherry-pick a319d88" should be run
    45  
    46    Scenario: From fork that doesn't have a remote
    47      When I run `hub cherry-pick https://github.com/jingweno/ronn/commit/a319d88`
    48      Then "git remote add -f jingweno git://github.com/jingweno/ronn.git" should be run
    49      And "git cherry-pick a319d88" should be run