Skip to content

Commit

Permalink
separate argv in calls to Git#native
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Dec 9, 2010
1 parent 1cfcc1b commit ce31d0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/grit/commit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def self.diff(repo, a, b = nil, paths = [], options = {})

def show
if parents.size > 1
diff = @repo.git.native("diff #{parents[0].id}...#{parents[1].id}", {:full_index => true})
diff = @repo.git.native(:diff, {:full_index => true}, "#{parents[0].id}...#{parents[1].id}")
else
diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
end
Expand Down
3 changes: 2 additions & 1 deletion lib/grit/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ def diff_objects(commit_sha, parents = true)
else
# NO PARENTS:
cmd = "-r -t #{commit_sha}"
revs = self.git.method_missing('ls-tree', {:timeout => false}, "-r -t #{commit_sha}").split("\n").map{ |a| a.split("\t").first.split(' ')[2] }
revs = self.git.native(:ls_tree, {:timeout => false, :r => true, :t => true}, commit_sha).
split("\n").map{ |a| a.split("\t").first.split(' ')[2] }
end
revs << self.commit(commit_sha).tree.id
Grit.no_quote = false
Expand Down

0 comments on commit ce31d0d

Please sign in to comment.