Skip to main content

Crate gitpoulpi_cli_backend

Crate gitpoulpi_cli_backend 

Source
Expand description

GitBackend implementation driving an installed system git binary.

Used both standalone (user-selectable default_backend = "system") and as the CLI-fallback target inside Git2Backend for operations git2 doesn’t support well. Parses only machine-readable git output (--porcelain=v2 -z, NUL-delimited log formats) – never human text.

Structs§

CommandOutput
How a finished program ended.
ConfigEntry
One value of a multi-valued config key, in the order git read it.
SystemGitBackend

Enums§

CommandRunError
Why a program gave no output at all.
CredentialMode
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials (credentials.https_mode). Process-wide because the daemon owns the process and re-reads the setting before each network operation.

Constants§

MODE_LINK

Functions§

apply_tag_sync
Fills in every tag’s tag_sync and appends one remote-only row per mirrored tag name that has no refs/tags/<name> here.
body_of
raw as a BlobBody: an LFS pointer is resolved to its local object (shared with the git2 backend so both answer alike).
check_config_section
The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. branch.<name> and remote.<name> only: this is an undo helper, not a config API.
config_entries
Every entry whose key matches pattern (a regexp, as --get-regexp takes it), in config order. Err when git cannot be asked; no match is an empty list.
config_key_in_section
The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. Whether key is a variable of section (branch.a owns branch.a.remote but not branch.a.b.remote, which is branch a.b’s).
credential_helper_entries
Every credential.helper and credential.<url>.helper entry.
credential_mode
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation.
document_from_stages
The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). Everything after the stages are read, shared with Git2Backend (which reads them natively): runs git’s 3-way merge on them, reads the labels and the file on disk, and assembles the document.
expand_home
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. ~/x as the user’s home plus x (ssh would, but the shell git runs the command in does not expand a quoted tilde).
git_dir
The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). The part of merge_document after the stages are read, and the label reader, shared with Git2Backend (which reads the stages natively). The git directory of the worktree at root: .git itself, or what a linked worktree’s (or submodule’s) .git file points at.
git_program
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. The git executable every spawn uses, resolved once per process.
global_ssh_key_command
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. The GIT_SSH_COMMAND a network command needs to use the configured key, or None when it must be left alone. Precedence, highest first - the configured key only fills a gap, it never overrides:
global_ssh_program
The program word of the effective global core.sshCommand (system or global scope; the repository’s own is what the profile overrides), or ssh. Users often point it at the Windows OpenSSH client to reach the Windows agent, so a key file must be offered through the same program.
is_config_key_section
The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. section is one allow-listed key standing for itself (see check_section).
lfs_local_object
The real content of an LFS object when it sits in the local store (<storage>/objects/aa/bb/<oid>, lfs.storage honoured) and is within max bytes. Costs one git rev-parse and one git config spawn.
machine_wide_helpers
The helpers that remain once the repository’s own are dropped: the system and global entries, in order, as (None, helper) for credential.helper and (Some(url), helper) for credential.<url>.helper. An empty value is git’s reset: it clears what was collected before it for the same scope of URLs, as git itself would.
prune_empty_parents
After removed files (paths relative to root) were deleted from disk, removes each directory that is now completely empty, walking up from every file’s parent and stopping at the first directory that is not.
reflog_via_git
The reflog through git log -g, for ref storage with no log files (reftable). old is the next older entry’s new (the first entry’s is ZERO_OID), so one extra entry is read to give the last one of the page its old and to know whether there is more. A ref without a reflog (a deleted branch, a tag, an unknown name) is an empty page.
remote_dependents_in
The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. The config-section rules of the undo journal, shared with Git2Backend so the two accept exactly the same sections. [remote_dependents] over already-read config entries (git2 shares it).
remove_stale_transfer_files
Which remotes are known to hold a tag at a given commit, given the remote-tag mirror.
run_command
Runs argv (program first) in cwd, waits at most timeout. On a timeout the whole process tree is killed at once (SIGKILL to its group, or the Windows Job Object terminated), not asked politely.
set_credential_mode
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. Sets the mode every later network command uses.
set_ssh_key
How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. How network commands get HTTPS credentials; the daemon sets it from credentials.https_mode before each network operation. Sets the key file every later network command offers to ssh (None: leave ssh to the agent and its own configuration). See ssh_key_command.
snapshot_normalize_all
snapshot_remove_any
Removes whatever is at full (file, symlink or directory), if anything.
snapshot_walk
Every file (and, on Unix, symlink) at or under each of paths in the working tree, by repo-relative path. .git is never entered.
snapshot_write_file
ssh_command_entries
Every core.sshCommand entry.
tag_sync_for
Which remotes hold name, split by whether they hold it at this commit; local says whether the tag exists here at all.
total_spawn_count
Process-wide spawn counter (see process), the perf guard’s currency. How many git commands the whole process has built so far, on any thread. Unlike the per-thread count it sees the daemon’s worker threads, so the daemon tests and xtask perf use it; callers that share a process with other git users must serialise themselves to diff it.