You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% datalad ls-file-collection gittree .
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/datalad/cli/main.py", line 190, in _run_with_exception_handler
return cmdlineargs.func(cmdlineargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/cli/exec.py", line 107, in call_from_parser
ret = list(ret)
^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad_next/patches/interface_utils.py", line 218, in _execute_command_
for r in _process_results(
File "/usr/lib/python3/dist-packages/datalad/interface/utils.py", line 319, in _process_results
for res in results:
File "/usr/lib/python3/dist-packages/datalad_next/commands/ls_file_collection.py", line 405, in __call__
for item in collection.iter:
File "/usr/lib/python3/dist-packages/datalad_next/iter_collections/gittree.py", line 112, in iter_gittree
for line in _git_ls_tree(path, treeish, *lstree_args):
File "/usr/lib/python3/dist-packages/datalad_next/iter_collections/gittree.py", line 130, in _git_ls_tree
with iter_git_subproc(
File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__
next(self.gen)
File "/usr/lib/python3/dist-packages/datalad_next/iterable_subprocess/iterable_subprocess.py", line 192, in iterable_subprocess
raise CommandError(
datalad.runner.exception.CommandError: <exception str() failed>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/datalad", line 33, in <module>
sys.exit(load_entry_point('datalad==0.19.5', 'console_scripts', 'datalad')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/cli/main.py", line 143, in main
_run(cmdlineargs)
File "/usr/lib/python3/dist-packages/datalad/cli/main.py", line 169, in _run
else _run_with_exception_handler(namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/cli/main.py", line 212, in _run_with_exception_handler
exit_code = _communicate_commanderror(exc) or exit_code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/cli/main.py", line 225, in _communicate_commanderror
exc_msg = exc.to_str(include_output=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/runner/exception.py", line 61, in to_str
join_cmdline(cmd) if isinstance(cmd, list) else cmd
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/utils.py", line 2672, in join_cmdline
return ' '.join(map(quote_cmdlinearg, args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/datalad/utils.py", line 2656, in quote_cmdlinearg
) if on_windows else shlex_quote(arg)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/shlex.py", line 329, in quote
if _find_unsafe(s) is None:
^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'PosixPath'
Using HEAD instead of . results in an expected behavior.
Instead of crashing, it should determine that . is not a valid tree-ish:
% git ls-tree .
fatal: Not a valid object name .
The text was updated successfully, but these errors were encountered:
Here is the demo:
Using
HEAD
instead of.
results in an expected behavior.Instead of crashing, it should determine that
.
is not a valid tree-ish:The text was updated successfully, but these errors were encountered: