Skip to content

Commit

Permalink
Add path argument to lstree and pass it to RJGit's ls_tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartkamphorst committed Jan 11, 2025
1 parent af31316 commit 5a44d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rjgit_adapter/git_layer_rjgit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ def log(ref = Gollum::Git.default_ref_for_repo(@repo), path = nil, options = {})
git.log(Gollum::Git.canonicalize(ref), path, options)
end

def lstree(sha, options={})
entries = RJGit::Porcelain.ls_tree(@repo.jrepo, nil, @repo.find(sha, :tree), {:recursive => options[:recursive]})
def lstree(sha, path=nil, options={})
entries = RJGit::Porcelain.ls_tree(@repo.jrepo, path, @repo.find(sha, :tree), {:recursive => options[:recursive]})
entries.map! do |entry|
entry[:mode] = entry[:mode]
entry[:sha] = entry[:id]
Expand Down

0 comments on commit 5a44d17

Please sign in to comment.