Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gitworktree to ls-file-collection's docstring #471

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.d/20231004_180525_mslw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### 📝 Documentation

- Include `gitworktree` among the available file collection types
listed in `ls-file-collection`'s docstring. Fixes
https://github.com/datalad/datalad-next/issues/470 via
https://github.com/datalad/datalad-next/pull/471 (by @mslw)
16 changes: 15 additions & 1 deletion datalad_next/commands/ls_file_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,28 @@ class LsFileCollection(ValidatedInterface):
``directory``
Reports on the content of a given directory (non-recursively). The
collection identifier is the path of the directory. Item identifiers
are the name of a file within that directory. Standard properties like
are the names of items within that directory. Standard properties like
``size``, ``mtime``, or ``link_target`` are included in the report.
[PY: When hashes are computed, an ``fp`` property with a file-like
is provided. Reading file data from it requires a ``seek(0)`` in most
cases. This file handle is only open when items are yielded directly
by this command (``return_type='generator``) and only until the next
result is yielded. PY]

``gitworktree``
Reports on all tracked and untracked content of a Git repository's
work tree. The collection identifier is a path of a directory in a Git
repository (which can, but needs not be, its root). Item identifiers
are the relative paths of items within that directory. Reported
properties include ``gitsha`` and ``gittype``; note that the
``gitsha`` is not equivalent to a SHA1 hash of a file's content, but
is the SHA-type blob identifier as reported and used by Git.
[PY: When hashes are computed, an ``fp`` property with a file-like is
provided. Reading file data from it requires a ``seek(0)`` in most
cases. This file handle is only open when items are yielded directly
by this command (``return_type='generator``) and only until the next
result is yielded. PY]

``tarfile``
Reports on members of a TAR archive. The collection identifier is the
path of the TAR file. Item identifiers are the relative paths
Expand Down
Loading