lib/grit/status.rb in gitlab-grit-2.6.9 vs lib/grit/status.rb in gitlab-grit-2.6.10
- old
+ new
@@ -114,11 +114,11 @@
end
# compares the index and the working directory
def diff_files
hsh = {}
- @base.git.diff_files(chdir: @base.working_dir).split("\n").each do |line|
+ @base.git.diff_files({}).split("\n").each do |line|
(info, file) = line.split("\t")
(mode_src, mode_dest, sha_src, sha_dest, type) = info.split
hsh[file] = {:path => file, :mode_file => mode_src.to_s[1, 7], :mode_index => mode_dest,
:sha_file => sha_src, :sha_index => sha_dest, :type => type}
end
@@ -126,21 +126,21 @@
end
# compares the index and the repository
def diff_index(treeish)
hsh = {}
- @base.git.diff_index({chdir: @base.working_dir}, treeish).split("\n").each do |line|
+ @base.git.diff_index({}, treeish).split("\n").each do |line|
(info, file) = line.split("\t")
(mode_src, mode_dest, sha_src, sha_dest, type) = info.split
hsh[file] = {:path => file, :mode_repo => mode_src.to_s[1, 7], :mode_index => mode_dest,
:sha_repo => sha_src, :sha_index => sha_dest, :type => type}
end
hsh
end
def ls_files
hsh = {}
- lines = @base.git.ls_files({chdir: @base.working_dir, :stage => true})
+ lines = @base.git.ls_files({:stage => true})
lines.split("\n").each do |line|
(info, file) = line.split("\t")
(mode, sha, stage) = info.split
hsh[file] = {:path => file, :mode_index => mode, :sha_index => sha, :stage => stage}
end