From 11e20a20747ca2c4f4aaa985551caa049035d724 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Wed, 28 Feb 2018 12:55:52 -0300 Subject: [PATCH] Fix ls-files for git 2.16 Since GIT version 2.16.0 empty pathspecs as alias to "everything" has been made illegal. A more detailed study this change's impact has been made at: https://github.com/ruby-git/ruby-git/issues/345#issuecomment-369260500 Closes #345 --- lib/git/lib.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 777e42ea..00cc0e72 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -396,6 +396,7 @@ def diff_index(treeish) end def ls_files(location=nil) + location ||= '.' hsh = {} command_lines('ls-files', ['--stage', location]).each do |line| (info, file) = line.split("\t")