Skip to content

Commit

Permalink
Added support for filenames which are quoted (usually containing inte…
Browse files Browse the repository at this point in the history
…rnational/unicode characters).
  • Loading branch information
gf3 committed Mar 17, 2009
1 parent 96bf1ac commit ee90922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def ls_files
command_lines('ls-files', '--stage').each do |line|
(info, file) = line.split("\t")
(mode, sha, stage) = info.split
file = eval(file) if file =~ /^\".*\"$/ # This takes care of quoted strings returned from git
hsh[file] = {:path => file, :mode_index => mode, :sha_index => sha, :stage => stage}
end
hsh
Expand Down
2 changes: 1 addition & 1 deletion lib/git/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def construct_status
@files[file] = {:path => file, :untracked => true} unless @files[file] || File.directory?(file) || ignore.include?(file)
end
end

# find modified in tree
@base.lib.diff_files.each do |path, data|
@files[path] ? @files[path].merge!(data) : @files[path] = data
Expand Down

0 comments on commit ee90922

Please sign in to comment.