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

Initial annex support #24

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Initial annex support #24

merged 2 commits into from
Oct 16, 2024

Commits on Oct 15, 2024

  1. feat: call_annex_json_lines() utility

    Low-level helper to execute git-annex command that support `--json` and
    `--json-error-messages`.
    
    This initial implementation does not (yet) support input iterables.
    mih committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    0872ca4 View commit details
    Browse the repository at this point in the history
  2. feat: annex interfaces and initialization

    `Repo` and `Worktree` received dedicated, optional support for annexes,
    and their initialization.
    
    The concept is is substantially different from that implemented in
    legacy DataLad. There, an `AnnexRepo` class was derived from a `GitRepo`
    class and extended and overwrote individual methods, forming a
    relatively high-level API.
    
    Here, any `Repo` or `Worktree` can have an optional annex. All
    operations related to that annex are implemented in dedicated handlers
    that are fully independent of a `Repo` or `Worktree` instance.
    
    The aim is to reduce the complex interdependencies that cripple the
    validity and robustness of the legacy implementations. Git is used more
    "directly", even in git-annex repositories and git-annex is used
    more directly, and agnostic of the context and demands of high-level
    operations.
    
    This has important consequences. For example, a method like the
    legacy `AnnexRepo.save()` cannot exist, because there is no
    `GitRepo.save` that it can override and "do the right thing" for a
    git-annex repository.
    
    This is acceptable here, because the API provided in this module
    is not targeting the level of compound/convenience operations like
    `save()` that aim to alleviate a developer's required expertise.
    Instead, the aim here is to provide primitives that can be used in a
    higher-level (possibly function-based) API.
    mih committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    6d6ae4a View commit details
    Browse the repository at this point in the history