Skip to content

Commit

Permalink
Add quotes around files with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Willa Drengwitz committed Aug 31, 2018
1 parent fc679a0 commit 750697e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/git/status_shortcuts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ class GitChange < GitStatus
def initialize(file_and_message, status)
@message = file_and_message.slice!(/\(.*\)/)
@file = file_and_message.strip
@file = (@file.include? " ") ? "\"#{@file}\"" : @file
@status = status.strip
end

Expand Down

0 comments on commit 750697e

Please sign in to comment.