Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Fix #509
Browse files Browse the repository at this point in the history
  • Loading branch information
akonwi committed Nov 7, 2016
1 parent 2414eec commit 2cb0add
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/views/cherry-pick-select-commits-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CherryPickSelectCommits extends SelectListMultipleView

completed: (items) ->
@cancel()
commits = item.hash for item in items
commits = items.map (item) -> item.hash
git.cmd(['cherry-pick'].concat(commits), cwd: @repo.getWorkingDirectory())
.then (msg) -> notifier.addSuccess msg
.catch (msg) -> notifier.addError msg
4 changes: 3 additions & 1 deletion spec/views/cherry-pick-select-commit-view-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ describe "CherryPickSelectCommits view", ->
it "calls git.cmd with 'cherry-pick' and the selected commits", ->
spyOn(git, 'cmd').andReturn Promise.resolve 'success'
@view.confirmSelection()
@view.selectNextItemView()
@view.confirmSelection()
@view.find('.btn-pick-button').click()
expect(git.cmd).toHaveBeenCalledWith ['cherry-pick', 'commit1'], cwd: repo.getWorkingDirectory()
expect(git.cmd).toHaveBeenCalledWith ['cherry-pick', 'commit1', 'commit2'], cwd: repo.getWorkingDirectory()

0 comments on commit 2cb0add

Please sign in to comment.