class Git::Commands::LsTree

Implements the ‘git ls-tree` command

Lists the contents of a tree object, showing the mode, type, object name, and file name of each item. Supports recursive listing, output format control, and path filtering.

@example List the top-level tree of HEAD

ls_tree = Git::Commands::LsTree.new(execution_context)
ls_tree.call('HEAD')

@example Recursively list all files under HEAD

ls_tree = Git::Commands::LsTree.new(execution_context)
ls_tree.call('HEAD', r: true)

@example List only file names recursively

ls_tree = Git::Commands::LsTree.new(execution_context)
ls_tree.call('HEAD', r: true, name_only: true)

@example List entries under a specific path

ls_tree = Git::Commands::LsTree.new(execution_context)
ls_tree.call('HEAD', 'lib/')

@note ‘arguments` block audited against git-scm.com/docs/git-ls-tree/2.53.0

@see git-scm.com/docs/git-ls-tree git-ls-tree

@api private