Skip to content

Commit

Permalink
Remove empty last element inside of git.status function
Browse files Browse the repository at this point in the history
  • Loading branch information
flexoid committed Jun 5, 2016
1 parent ebb45bf commit 2c08021
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/git.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = git =

status: (repo) ->
git.cmd(['status', '--porcelain', '-z'], cwd: repo.getWorkingDirectory())
.then (data) -> if data.length > 2 then data.split('\0') else []
.then (data) -> if data.length > 2 then data.split('\0')[...-1] else []

refresh: () ->
atom.project.getRepositories().forEach (repo) ->
Expand Down
2 changes: 1 addition & 1 deletion lib/views/status-list-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class StatusListView extends SelectListView
initialize: (@repo, @data) ->
super
@show()
@setItems @parseData @data[...-1]
@setItems @parseData @data
@focusFilterEditor()

parseData: (files) ->
Expand Down

0 comments on commit 2c08021

Please sign in to comment.