datalad_core.git_utils

Low-level helpers for Git operations.

The functions in this module are low-level implementation. They do not necessarily verify the conditions in which they can be used appropriately, in order to allow for flexible combinations without duplicating verification costs. Check the individual documentation for information on constraints and limitations.

apply_changeset(target, changes, *, message)

Apply a changeset to a (bare) repository

get_current_branch(repository)

Returns output of git branch --show-current

get_object_name(repository, rev)

Returns output of git rev-parse <rev>

iter_repo_status(repository, *[, ...])

Front-end for git status --porcelain=2

parse_gitconfig_zlines(lines)

Parse lines produced by iter_git_subproc_zlines()

read_gitmodules(source)

Read a worktree's (or a specific) .gitmodules file

read_gitmodules_blob(source, blob)

Read .gitmodules from a blob in a repository

repo_is_dirty(repository)

Is a repository dirty?

types