Porcelain (gix-equivalent): high-level Git operations facade
Dependencies
pub(open) trait ObjectStore {
fn get(Self, ObjectId) -> PackObject? raise GitError
fn put(Self, ObjectType, Bytes) -> ObjectId raise GitError
fn has(Self, ObjectId) -> Bool raise GitError
}pub(open) trait WorkingTree {
fn read_file(Self, String) -> Bytes raise GitError
fn write_file(Self, String, Bytes) -> Unit
fn remove_file(Self, String) -> Unit
fn is_file(Self, String) -> Bool
fn is_dir(Self, String) -> Bool
fn readdir(Self, String) -> Array[String] raise GitError
fn is_dirty(Self) -> Bool
fn rollback(Self) -> Unit
fn get_working_files(Self) -> Array[String]
fn snapshot(Self, String, String, Int64) -> ObjectId raise GitError
fn checkout(Self, ObjectId) -> Unit raise GitError
}pub(all) struct BranchConfig {
name : String
remote : String?
merges : Array[String]
rebase : Bool?
}pub struct CherryPickResult {
status : CherryPickStatus
commit_id : ObjectId?
conflicts : Array[String]
}pub struct CommitGraphFile {
data : Bytes
hash_size : Int
num_commits : Int
oidf_offset : Int
oidl_offset : Int
cdat_offset : Int
edge_offset : Int
}fn CommitGraphFile::load(rfs : &RepoFileSystem, git_dir : String) -> CommitGraphFile? raise GitErrorfn CommitGraphFile::read_commit(self : CommitGraphFile, pos : Int) -> (ObjectId, Array[ObjectId], Int64)fn CommitGraphFile::synthesize_commit_object(self : CommitGraphFile, pos : Int, id : ObjectId) -> PackObjectpub(all) struct ConfigBlock {
header : String?
section : String?
name : String?
lines : Array[String]
}pub struct DiffFile {
path : String
kind : DiffKind
old_content : Bytes?
new_content : Bytes?
old_mode : Int?
new_mode : Int?
}pub struct IndexEntry {
path : String
id : ObjectId
mode : Int
size : Int
mtime_sec : Int
mtime_nsec : Int
intent_to_add : Bool
dev : Int
ino : Int
uid : Int
gid : Int
}fn IndexEntry::new(path : String, id : ObjectId, mode : Int, size : Int, mtime_sec? : Int, mtime_nsec? : Int, intent_to_add? : Bool, dev? : Int, ino? : Int, uid? : Int, gid? : Int) -> IndexEntrypub(all) struct InitOptions {
default_branch : String
bare : Bool
separate_git_dir : String?
template_dir : String?
ref_format : String
object_format : String
is_reinit : Bool
git_dir : String?
work_tree : String?
shared : String?
}pub struct InteractiveRebaseResult {
status : InteractiveRebaseStatus
commit_id : ObjectId?
message : String
exit_code : Int
}pub struct InteractiveRebaseState {
onto : ObjectId
orig_head : ObjectId
head_name : String
todo : Array[InteractiveTodoEntry]
done : Array[InteractiveTodoEntry]
amend : Bool
squash_msg : String
update_refs : Map[String, String]
commit_map : Map[String, String]
labels : Map[String, String]
}pub enum InteractiveRebaseStatus {
IRBComplete
IRBConflict
IRBStopped
IRBAborted
}pub struct InteractiveTodoEntry {
command : TodoCommand
commit_hex : String
subject : String
} derive(Eq, Debug)fn LazyPackIndex::find_offset(self : LazyPackIndex, fs : &RepoFileSystem, id : ObjectId) -> Int64? raise GitErrorfn LazyPackIndex::find_offset_hex(self : LazyPackIndex, fs : &RepoFileSystem, hex : String) -> Int64? raise GitErrorpub struct MergeResult {
status : MergeStatus
commit_id : ObjectId?
conflicts : Array[String]
conflict_types : Map[String, String]
}pub struct ObjectDb {
objects_dir : String
loose_paths : Map[String, String]
packs : Array[PackIndex]
lazy_packs : Array[LazyPackIndex]
pack_cache : Map[String, Bytes]
pack_cache_order : Array[String]
pack_cache_limit : Int
decoded_cache : Map[String, PackObject]
decoded_cache_order : Array[String]
decoded_cache_bytes : Int
decoded_cache_limit : Int
prefer_packed : Bool
saw_corrupt_pack : Bool
skip_verify : Bool
commit_graph : CommitGraphFile?
}fn ObjectDb::find_object_disk_size(self : ObjectDb, fs : &RepoFileSystem, id : ObjectId) -> Int? raise GitErrorfn ObjectDb::get(self : ObjectDb, fs : &RepoFileSystem, id : ObjectId) -> PackObject? raise GitErrorfn ObjectDb::load_from_objects_dir(fs : &RepoFileSystem, objects_dir : String) -> ObjectDb raise GitErrorfn ObjectDb::load_lazy_from_objects_dir(fs : &RepoFileSystem, objects_dir : String) -> ObjectDb raise GitErrorasync fn PromisorDb::fetch_missing(self : PromisorDb, write_fs : &FileSystem, ids : Array[ObjectId]) -> Array[PackObject] raise GitErrorasync fn PromisorDb::fetch_one(self : PromisorDb, write_fs : &FileSystem, id : ObjectId) -> PackObject? raise GitErrorfn PromisorDb::get(self : PromisorDb, fs : &RepoFileSystem, id : ObjectId) -> PackObject? raise GitErrorasync fn PromisorDb::get_or_fetch(self : PromisorDb, read_fs : &RepoFileSystem, write_fs : &FileSystem, id : ObjectId) -> PackObject? raise GitErrorfn PromisorDb::has_local(self : PromisorDb, fs : &RepoFileSystem, id : ObjectId) -> Bool raise GitErrorfn PromisorDb::new(fs : &RepoFileSystem, git_dir : String, lazy_load? : Bool, fetch_fn~ : async (String, Array[ObjectId]) -> Result[Array[PackObject], GitError] noraise?) -> PromisorDb raise GitErrorpub(all) struct ReceivePackProcResult {
refname : String
original_refname : String
old_id : String
new_id : String
status : String
message : String
fall_through : Bool
}pub enum RemoteHeadState {
Missing
Detached(String)
Symref(String)
Other(String)
}pub struct ResolveUndoEntry {
path : String
base : ResolveUndoStage?
ours : ResolveUndoStage?
theirs : ResolveUndoStage?
}pub(all) struct UploadPackConfig {
allow_filter : Bool
blob_packfile_uri : String?
allow_ref_in_want : Bool
}fn UploadPackConfig::new(allow_filter : Bool, blob_packfile_uri : String?, allow_ref_in_want : Bool) -> UploadPackConfigpub(all) struct WorktreeInfo {
path : String
head_id : ObjectId?
branch : String?
locked : Bool
is_main : Bool
is_bare : Bool
}fn add_paths(fs : &FileSystem, rfs : &RepoFileSystem, root : String, paths : Array[String], algo? : HashAlgorithm) -> Unit raise GitErrorasync fn add_paths_async(fs : &FileSystem, rfs : &RepoFileSystem, root : String, paths : Array[String], run_filter_cmd? : FilterCmd, warnings? : Array[String]) -> Unit raise GitErrorfn append_reflog(wfs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, refname : String, old_id : ObjectId, new_id : ObjectId, author : String, email : String, timestamp : Int64, timezone : String, message : String) -> Unit raise GitErrorfn apply_config_overrides(remotes : Map[String, RemoteConfig], branches : Map[String, BranchConfig], overrides : Array[(String, String)]) -> Unitasync fn apply_filter_smudge(rfs : &RepoFileSystem, content : Bytes, attrs : FileEolAttrs, root : String, git_dir : String, run_filter_cmd : FilterCmd?) -> Bytes raise GitErrorfn apply_receive_pack(fs : &FileSystem, rfs : &RepoFileSystem, root : String, req : ReceivePackRequest, skip_connectivity_check? : Bool, git_dir_override? : String) -> ReceivePackResult raise GitErrorfn apply_template(wfs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, template_dir : String) -> Unit raise GitErrorfn autosquash_interactive_todo(entries : Array[InteractiveTodoEntry]) -> Array[InteractiveTodoEntry]fn bisect_mark_ancestors(db : ObjectDb, rfs : &RepoFileSystem, start : ObjectId, set : Map[String, Bool]) -> Unitfn bisect_steps(n : Int) -> Intfn build_receive_pack_advertisement(fs : &RepoFileSystem, root : String, agent? : String, protocol_version? : Int, extra_haves? : Array[ObjectId], git_dir_override? : String, advertise_push_options? : Bool, cert_nonce? : String) -> Bytes raise GitErrorfn build_upload_pack_advertisement(fs : &RepoFileSystem, root : String, agent? : String, protocol_version? : Int) -> Bytes raise GitErrorfn build_upload_pack_config_with_overrides(fs : &RepoFileSystem, root : String, overrides : Map[String, String]) -> UploadPackConfigfn check_shorthand_ambiguity(url : String, dir_exists : (String) -> Bool) -> String?fn checkout(fs : &FileSystem, rfs : &RepoFileSystem, root : String, spec : String, detach? : Bool, update_worktree? : Bool, update_index? : Bool) -> ObjectId raise GitErrorfn cherry_pick(fs : &FileSystem, rfs : &RepoFileSystem, root : String, commit_id : ObjectId, author : String, timestamp : Int64, allow_empty? : Bool, no_commit? : Bool, message_suffix? : String, signoff_committer? : String) -> CherryPickResult raise GitErrorfn clear_rebase_state(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String) -> Unit raise GitErrorfn collect_commit_tree_only(db : ObjectDb, fs : &RepoFileSystem, commit_id : ObjectId) -> Array[PackObject] raise GitErrorfn collect_diff_objects(db : ObjectDb, fs : &RepoFileSystem, base_commit : ObjectId, new_commit : ObjectId) -> Array[PackObject] raise GitErrorfn collect_loose_ref_ids(fs : &RepoFileSystem, dir : String, prefix : String, out : Map[String, ObjectId], filter_prefix : String?) -> Unitfn collect_packed_ref_ids(fs : &RepoFileSystem, git_dir : String, out : Map[String, ObjectId], filter_prefix : String?) -> Unitfn collect_reachable_objects(db : ObjectDb, fs : &RepoFileSystem, commit_id : ObjectId) -> Array[PackObject] raise GitErrorfn collect_reachable_objects_excluding_commits(db : ObjectDb, fs : &RepoFileSystem, commits : Array[ObjectId], excluded_commits : Array[ObjectId]) -> Array[PackObject] raise GitErrorfn collect_reachable_objects_from_commits(db : ObjectDb, fs : &RepoFileSystem, commits : Array[ObjectId]) -> Array[PackObject] raise GitErrorfn collect_tree_files(db : ObjectDb, fs : &RepoFileSystem, tree_id : ObjectId) -> Map[String, TreeFileEntry] raise GitErrorfn collect_tree_files_from_commit(db : ObjectDb, fs : &RepoFileSystem, commit_id : ObjectId) -> Map[String, TreeFileEntry] raise GitErrorfn commit(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message : String, author : String, author_timestamp : Int64, committer? : String, committer_timestamp? : Int64, allow_empty? : Bool, timezone? : String, encoding? : String, author_timezone? : String?, committer_timezone? : String?, algo? : HashAlgorithm) -> ObjectId raise GitErrorfn commit_amend(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message : String, author : String, author_timestamp : Int64, committer? : String, committer_timestamp? : Int64, timezone? : String, encoding? : String, author_timezone? : String?, committer_timezone? : String?, algo? : HashAlgorithm) -> ObjectId raise GitErrorfn commit_apply_signoff(msg : String, committer~ : String) -> Stringfn commit_is_trailer_line(line : String) -> Boolfn commit_strip_message(msg : String) -> Stringfn compat_append_loose_object_idx(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, storage_id : ObjectId, compat_id : ObjectId) -> Unit raise GitErrorfn compat_lookup_loose_object_idx(rfs : &RepoFileSystem, git_dir : String, spec : String) -> String?fn compat_record_annotated_tag_mapping(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, storage_id : ObjectId, target : ObjectId, target_type : String, name : String, message : String, tagger : String, timestamp : Int64, timezone : String) -> Unit raise GitErrorfn compat_record_blob_mapping(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, storage_id : ObjectId, content : Bytes) -> Unit raise GitErrorfn compat_record_commit_mapping(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, storage_id : ObjectId, commit : Commit) -> Unit raise GitErrorfn compat_record_tree_mapping(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, storage_id : ObjectId, entries : Array[TreeEntry]) -> Unit raise GitErrorfn convert_lf_to_crlf(content : Bytes) -> Bytesfn copy_tree(fs : &FileSystem, rfs : &RepoFileSystem, src : String, dest : String) -> Unit raise GitErrorfn create_annotated_tag(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String, target : ObjectId, message : String, tagger : String, timestamp : Int64, timezone? : String) -> Unit raise GitErrorfn create_branch(fs : &FileSystem, rfs : &RepoFileSystem, root : String, name : String, start_point? : String?, author? : String, email? : String, timestamp? : Int64, timezone? : String) -> Unit raise GitErrorfn create_branch_at(fs : &FileSystem, rfs : &RepoFileSystem, root : String, name : String, commit_id : ObjectId, start_point? : String?, author? : String, email? : String, timestamp? : Int64, timezone? : String) -> Unit raise GitErrorfn create_lightweight_tag(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String, target : ObjectId) -> Unit raise GitErrorfn create_reflog(wfs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, refname : String) -> Unit raise GitErrorfn create_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_path : String, commit_ish : String?, detach? : Bool, force? : Bool, new_branch~ : String?, relative_paths? : Bool?, orphan? : Bool, checkout_files? : Bool) -> Unit raise GitErrorfn decode_commit_message_bytes(data : Bytes, encoding : String) -> Stringfn delete_branch(fs : &FileSystem, rfs : &RepoFileSystem, root : String, name : String, force? : Bool) -> Unit raise GitErrorfn delete_reflog(wfs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, refname : String) -> Unit raise GitErrorfn delete_tag(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String) -> Unit raise GitErrorfn detect_protocol_version(data : Bytes) -> Intfn diff_index(fs : &RepoFileSystem, root : String, db? : ObjectDb) -> Array[DiffFile] raise GitErrorfn diff_tree_abbrev_hex(hex : String, abbrev : Int?) -> Stringfn diff_tree_filter_matches(filter : String?, status : String) -> Boolasync fn diff_worktree(fs : &RepoFileSystem, root : String, run_filter_cmd? : FilterCmd) -> Array[DiffFile] raise GitErrorasync fn execute_interactive_todo(fs : &FileSystem, rfs : &RepoFileSystem, root : String, state : InteractiveRebaseState, message_editor : async (String) -> String?, exec_runner? : async (String) -> Int?) -> InteractiveRebaseResult raise GitErrorfn expand_sparse_index_entries(fs : &RepoFileSystem, git_dir : String, entries : Array[IndexEntry]) -> Array[IndexEntry] raise GitErrorfn expand_sparse_skip_worktree_paths(fs : &RepoFileSystem, git_dir : String, entries : Array[IndexEntry], skip_worktree_paths : Map[String, Bool]) -> Map[String, Bool] raise GitErrorasync fn fast_forward_to(fs : &FileSystem, rfs : &RepoFileSystem, root : String, target : ObjectId, run_filter_cmd? : FilterCmd) -> Unit raise GitErrorfn find_tree_entry(db : ObjectDb, fs : &RepoFileSystem, tree_id : ObjectId, path : String) -> TreeEntry? raise GitErrorfn fsck_connectivity_check(db : ObjectDb, fs : &RepoFileSystem, tips : Array[ObjectId], collect_extra? : Bool) -> FsckResultfn fsck_verify_loose_hash(raw : Bytes, expected_hex : String) -> Boolfn generate_interactive_todo_text(db : ObjectDb, rfs : &RepoFileSystem, commits : Array[ObjectId]) -> String raise GitErrorfn get_reflog_path(git_dir : String, refname : String) -> Stringfn get_subdir_tree_from_commit(db : ObjectDb, fs : &RepoFileSystem, commit_id : ObjectId, subdir_path : String) -> ObjectId? raise GitErrorfn get_worktree_lock_reason(rfs : &RepoFileSystem, root : String, worktree_path : String) -> String? raise GitErrorfn get_worktree_prunable_reason(rfs : &RepoFileSystem, root : String, worktree_path : String) -> String? raise GitErrorfn history_fixup(db : ObjectDb, fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, target_id : ObjectId, index_tree : ObjectId, head_id : ObjectId, tips : Array[HistoryRefUpdate], empty : HistoryEmptyAction, reedit_message : String?) -> HistoryFixupResult raise GitErrorfn history_reword(db : ObjectDb, fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, target_id : ObjectId, new_message : String, tips : Array[HistoryRefUpdate]) -> HistoryFixupResult raise GitErrorfn init_repo(fs : &FileSystem, root : String, default_branch? : String, bare? : Bool) -> Unit raise GitErrorfn init_repo_with_options(fs : &FileSystem, root : String, opts : InitOptions) -> Unit raise GitErrorfn init_repo_with_options_with_repo_fs(fs : &FileSystem, rfs : &RepoFileSystem, root : String, opts : InitOptions) -> Unit raise GitErrorfn insert_exec_after_picks(entries : Array[InteractiveTodoEntry], exec_cmds : Array[String]) -> Array[InteractiveTodoEntry]fn interactive_rebase_abort_impl(fs : &FileSystem, rfs : &RepoFileSystem, root : String) -> Unit raise GitErrorasync fn interactive_rebase_continue_impl(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message_editor : async (String) -> String?, exec_runner? : async (String) -> Int?) -> InteractiveRebaseResult raise GitErrorasync fn interactive_rebase_skip_impl(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message_editor : async (String) -> String?, exec_runner? : async (String) -> Int?) -> InteractiveRebaseResult raise GitErrorasync fn interactive_rebase_start(fs : &FileSystem, rfs : &RepoFileSystem, root : String, upstream : ObjectId, onto : ObjectId, sequence_editor : async (String) -> String?, message_editor : async (String) -> String?, autosquash? : Bool, exec_runner? : async (String) -> Int?, exec_cmds? : Array[String], update_refs? : Bool, root_mode? : Bool, rebase_merges? : Bool) -> InteractiveRebaseResult raise GitErrorfn is_ancestor_of(fs : &RepoFileSystem, git_dir : String, ancestor : ObjectId, descendant : ObjectId) -> Boolfn is_branch_checked_out(fs : &RepoFileSystem, root : String, branch : String) -> String? raise GitErrorfn is_branch_checked_out_elsewhere(fs : &RepoFileSystem, root : String, branch : String) -> String? raise GitErrorfn is_ignored_path(fs : &RepoFileSystem, root : String, rel_path : String, is_dir : Bool) -> Bool raise GitErrorfn last_modified_committer_ts(data : Bytes) -> Int64fn last_modified_resolve_commitish(db : ObjectDb, fs : &RepoFileSystem, id : ObjectId, spec : String) -> LmCommit raise GitErrorfn lfs_is_valid_http_url(url : String) -> Boolfn lfs_verify_oid(data : Bytes, expected_oid : String) -> Boolfn list_branches(fs : &RepoFileSystem, git_dir : String) -> (HeadRef, Array[BranchInfo]) raise GitErrorfn list_refs_with_ids(fs : &RepoFileSystem, git_dir : String, filter_prefix : String?) -> Map[String, ObjectId]fn list_remote_tracking_refs(fs : &RepoFileSystem, git_dir : String, remote_name : String) -> Map[String, ObjectId]async fn list_working_files_async(fs : &RepoFileSystem, root : String) -> Array[String] raise GitErrorfn load_all_objects_from_fs(fs : &RepoFileSystem, git_dir : String) -> Array[PackObject] raise GitErrorfn load_all_objects_from_object_dir(fs : &RepoFileSystem, objects_dir : String) -> Array[PackObject] raise GitErrorfn load_interactive_rebase_state(rfs : &RepoFileSystem, git_dir : String) -> InteractiveRebaseState? raise GitErrorfn lock_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_path : String, reason~ : String?) -> Unit raise GitErrorfn log_head(fs : &RepoFileSystem, git_dir : String, max_count? : Int, since? : Int64, until? : Int64, include_parent_tree? : Bool) -> Array[LogEntry] raise GitErrorfn log_head_oneline(fs : &RepoFileSystem, git_dir : String, max_count? : Int, since? : Int64, until? : Int64) -> Array[String] raise GitErrorfn merge(fs : &FileSystem, rfs : &RepoFileSystem, root : String, target : ObjectId, message : String, author : String, timestamp : Int64, ours_label? : String, theirs_label? : String) -> MergeResult raise GitErrorfn merge_base_is_ancestor(db : ObjectDb, fs : &RepoFileSystem, ancestor : ObjectId, descendant : ObjectId) -> Bool raise GitErrorfn move_tree(fs : &FileSystem, rfs : &RepoFileSystem, src : String, dest : String) -> Unit raise GitErrorfn move_tree_safe(fs : &FileSystem, rfs : &RepoFileSystem, src : String, dest : String) -> Unit raise GitErrorfn move_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, source_path : String, dest_path : String, force? : Bool, force_level? : Int, relative_paths? : Bool?) -> Unit raise GitErrorfn mv_path(fs : &FileSystem, rfs : &RepoFileSystem, root : String, source : String, dest : String, force? : Bool) -> Unit raise GitErrorfn normalize_index_pathspec_path(path : String) -> Stringfn parse_at_minus_prefix(spec : String) -> (Int, String)?fn parse_date_to_timestamp(date_str : String) -> Int64fn parse_index_pathspec(spec : String) -> (Int, String?)fn parse_iso8601_timestamp(date_str : String) -> Int64fn parse_reflog_date_selector(spec : String) -> (String, String)?fn parse_reflog_selector(spec : String) -> (String, Int)?fn parse_rev_parse_short_length(value : String) -> Int?fn parseopt_find_char(s : String, ch : Char) -> Int?fn parseopt_find_flags(s : String) -> Intfn parseopt_find_space(s : String) -> Int?fn prune_worktrees(fs : &FileSystem, rfs : &RepoFileSystem, root : String, dry_run? : Bool) -> Array[String] raise GitErrorfn prune_worktrees_detailed(fs : &FileSystem, rfs : &RepoFileSystem, root : String, dry_run? : Bool, expire_before_sec? : Int64?) -> Array[PrunedWorktreeEntry] raise GitErrorfn read_assume_unchanged_paths(fs : &RepoFileSystem, git_dir : String, hash_size? : Int) -> Map[String, Bool]fn read_config_bool(fs : &RepoFileSystem, config_path : String, section : String, name : String) -> Bool?fn read_config_value(fs : &RepoFileSystem, config_path : String, section : String, name : String) -> String?fn read_config_value_from_content(content_str : String, section : String, name : String) -> String?fn read_config_values(fs : &RepoFileSystem, config_path : String, section : String, name : String) -> Array[String]fn read_diff_function_patterns(rfs : &RepoFileSystem, git_dir : String, diff_driver : String) -> (String?, String?)fn read_filter_commands(rfs : &RepoFileSystem, git_dir : String, filter_name : String) -> (String?, String?)fn read_index_stage_entries(fs : &RepoFileSystem, git_dir : String) -> Array[IndexStageEntry] raise GitErrorfn read_local_remote_head_state(fs : &RepoFileSystem, head_path : String, remote_name : String) -> RemoteHeadStatefn read_reflog(fs : &RepoFileSystem, git_dir : String, refname : String) -> Array[ReflogEntry] raise GitErrorfn read_repo_config(fs : &RepoFileSystem, git_dir : String) -> (Map[String, RemoteConfig], Map[String, BranchConfig])fn read_resolve_undo_entries(fs : &RepoFileSystem, git_dir : String) -> Array[ResolveUndoEntry] raise GitErrorfn read_skip_worktree_paths(fs : &RepoFileSystem, git_dir : String, hash_size? : Int) -> Map[String, Bool]fn read_sparse_display_patterns(rfs : &RepoFileSystem, git_dir : String) -> Array[String] raise GitErrorasync fn rebase_abort(fs : &FileSystem, rfs : &RepoFileSystem, root : String, run_filter_cmd? : FilterCmd) -> Unit raise GitErrorasync fn rebase_continue(fs : &FileSystem, rfs : &RepoFileSystem, root : String, run_filter_cmd? : FilterCmd) -> RebaseResult raise GitErrorasync fn rebase_onto(fs : &FileSystem, rfs : &RepoFileSystem, root : String, upstream : ObjectId, run_filter_cmd? : FilterCmd) -> ObjectId raise GitErrorasync fn rebase_skip(fs : &FileSystem, rfs : &RepoFileSystem, root : String, run_filter_cmd? : FilterCmd) -> RebaseResult raise GitErrorasync fn rebase_start(fs : &FileSystem, rfs : &RepoFileSystem, root : String, upstream : ObjectId, run_filter_cmd? : FilterCmd) -> RebaseResult raise GitErrorasync fn rebase_start_with_onto(fs : &FileSystem, rfs : &RepoFileSystem, root : String, onto : ObjectId, upstream : ObjectId, force_rebase? : Bool, run_filter_cmd? : FilterCmd) -> RebaseResult raise GitErrorfn receive_build_status_response_with_proc(result : ReceivePackResult, proc_results : Array[ReceivePackProcResult], original_updates? : Array[RefUpdate]) -> Bytesfn receive_pack(fs : &FileSystem, rfs : &RepoFileSystem, root : String, data : Bytes, skip_connectivity_check? : Bool, git_dir_override? : String) -> Bytes raise GitErrorfn receive_pack_info_refs_response(fs : &RepoFileSystem, root : String, auth_header : String?, token : String, agent? : String) -> HttpResponse raise GitErrorfn receive_pack_response(fs : &FileSystem, rfs : &RepoFileSystem, root : String, auth_header : String?, token : String, body : Bytes) -> HttpResponse raise GitErrorfn refspec_map_dst(src_pat : String, dst_pat : String, refname : String) -> String?fn remote_set_branches(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String, branches : Array[String], add : Bool) -> Unit raise GitErrorfn remove_packed_ref(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, refname : String) -> Unit raise GitErrorfn remove_packed_refs_with_prefix(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, prefix : String, exact : String) -> Unit raise GitErrorfn remove_remote_refs(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String) -> Unitfn remove_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_path : String, force? : Bool, force_level? : Int) -> Unit raise GitErrorfn rename_branch(fs : &FileSystem, rfs : &RepoFileSystem, root : String, old_name : String, new_name : String, force? : Bool, author? : String, email? : String, timestamp? : Int64, timezone? : String) -> Unit raise GitErrorfn rename_packed_refs_prefix(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, old_prefix : String, new_prefix : String, old_exact : String, new_exact : String) -> Unit raise GitErrorfn repack_repo(fs : &FileSystem, rfs : &RepoFileSystem, root : String) -> RepackResult? raise GitErrorfn repair_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_paths? : Array[String]) -> Array[String] raise GitErrorfn repair_worktree_detailed(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_paths? : Array[String], relative_paths? : Bool?) -> WorktreeRepairResult raise GitErrorfn reset(fs : &FileSystem, rfs : &RepoFileSystem, root : String, spec : String, mode : ResetMode, committer? : String, timestamp? : Int64, timezone? : String) -> ObjectId raise GitErrorfn resolve_lfs_url_from_config(lfs_url? : String, remote_lfs_url? : String, remote_url? : String) -> Stringfn resolve_ref(fs : &RepoFileSystem, git_dir : String, refname : String) -> ObjectId? raise GitErrorfn resolve_ref_for_subdir(fs : &RepoFileSystem, git_dir : String, refspec : String) -> ObjectId? raise GitErrorfn restore_paths(fs : &FileSystem, rfs : &RepoFileSystem, root : String, paths : Array[String]) -> Unit raise GitErrorfn rev_list_find_range_dots(arg : String) -> (Int, Bool)?fn rev_list_glob_match(pattern : String, text : String) -> Boolfn rev_list_normalize_max_count(max_count : Int?) -> Int?fn rev_list_normalize_skip(skip_count : Int) -> Intfn rev_list_window(length : Int, skip_count : Int, max_count : Int?) -> (Int, Int)fn rev_parse_apply_prefix_to_colon_path(spec : String, prefix : String) -> Stringfn rev_parse_extract_tag_target_name(tag_text : String) -> String?fn rev_parse_git_path_uses_common_dir(requested_path : String) -> Boolfn rev_parse_glob_match(text : String, pattern : String) -> Boolfn rev_parse_is_inside_git_dir(cwd_abs : String, abs_git_dir : String) -> Boolfn rev_parse_make_relative(abs_target : String, cwd_abs : String) -> Stringfn rev_parse_normalize_glob_pattern(pattern : String) -> Stringfn rev_parse_normalize_path(path : String) -> Stringfn rev_parse_parse_config_bool(raw : String) -> Bool?fn rev_parse_parse_parent_suffix(spec : String) -> (String, String)?fn rewrite_packed_refs(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, transform : (String) -> String?) -> Unit raise GitErrorfn rm_paths(fs : &FileSystem, rfs : &RepoFileSystem, root : String, paths : Array[String], cached? : Bool, force? : Bool, recursive? : Bool) -> Unit raise GitErrorfn save_interactive_rebase_state(fs : &FileSystem, git_dir : String, state : InteractiveRebaseState) -> Unit raise GitErrorfn set_config_key(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, section : String, name : String, key : String, value : String) -> Unit raise GitErrorfn shell_single_quote(value : String) -> Stringfn shorten_oid_hex(hex : String, requested : Int) -> Stringfn should_log_ref(fs : &RepoFileSystem, git_dir : String, refname : String, is_bare : Bool) -> (Bool, Bool) raise GitErrorfn smudge_for_checkout(content : Bytes, attrs : FileEolAttrs, autocrlf : AutoCrlf, core_eol? : EolAttr) -> Bytesfn sparse_checkout_add(fs : &FileSystem, rfs : &RepoFileSystem, root : String, new_patterns : Array[String]) -> Unit raise GitErrorfn sparse_checkout_disable(fs : &FileSystem, rfs : &RepoFileSystem, root : String) -> Unit raise GitErrorfn sparse_checkout_init(fs : &FileSystem, rfs : &RepoFileSystem, root : String, cone? : Bool) -> Unit raise GitErrorfn sparse_checkout_reapply(fs : &FileSystem, rfs : &RepoFileSystem, root : String) -> Unit raise GitErrorfn sparse_checkout_set(fs : &FileSystem, rfs : &RepoFileSystem, root : String, patterns : Array[String]) -> Unit raise GitErrorfn sparse_set_cone_config(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, value : Bool) -> Unit raise GitErrorfn sparse_set_index_sparse_config(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, value : Bool) -> Unit raise GitErrorfn split_config_key(full_key : String, section : String) -> (String, String)?fn stash_apply(fs : &FileSystem, rfs : &RepoFileSystem, root : String, index : Int, drop : Bool) -> Unit raise GitErrorfn stash_collect_paths(parent_files : Map[String, TreeFileEntry], stash_files : Map[String, TreeFileEntry]) -> Array[String]fn stash_drop(fs : &FileSystem, rfs : &RepoFileSystem, root : String, index : Int) -> Unit raise GitErrorfn stash_mode_str(mode : Int) -> Stringasync fn stash_push(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message : String, author : String, timestamp : Int64) -> ObjectId? raise GitErrorasync fn stash_push_patch(fs : &FileSystem, rfs : &RepoFileSystem, root : String, message : String, author : String, timestamp : Int64, select_hunk : async (StashPatchHunk, Int, Int) -> Bool) -> ObjectId? raise GitErrorasync fn status(fs : &RepoFileSystem, root : String, run_filter_cmd? : FilterCmd) -> Status raise GitErrorfn switch_branch(fs : &FileSystem, rfs : &RepoFileSystem, root : String, name : String, create? : Bool, checkout_files? : Bool) -> Unit raise GitErrorfn tree_files_to_index(db : ObjectDb, fs : &RepoFileSystem, files : Map[String, TreeFileEntry]) -> Array[IndexEntry] raise GitErrorfn unlock_worktree(fs : &FileSystem, rfs : &RepoFileSystem, root : String, worktree_path : String) -> Unit raise GitErrorfn update_fetch_refspec(spec : String, old_name : String, new_name : String) -> Stringfn update_follow_remote_head(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, name : String) -> Unit raise GitErrorfn update_head_ref(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, commit_id : ObjectId) -> Unit raise GitErrorfn update_subdir_base(wfs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, new_base : String) -> Unitfn upload_pack(fs : &RepoFileSystem, root : String, req : UploadPackRequest) -> Bytes raise GitErrorfn upload_pack_v2(fs : &RepoFileSystem, root : String, req : UploadPackRequestV2, config : UploadPackConfig) -> Bytes raise GitErrorfn write_index_entries(fs : &FileSystem, git_dir : String, entries : Array[IndexEntry], hash_size? : Int) -> Unit raise GitErrorfn write_index_entries_preserving_cache_tree(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, entries : Array[IndexEntry]) -> Unit raise GitErrorfn write_index_entries_with_flags(fs : &FileSystem, git_dir : String, entries : Array[IndexEntry], skip_worktree_paths : Map[String, Bool], assume_unchanged_paths : Map[String, Bool], hash_size? : Int) -> Unit raise GitErrorfn write_index_entries_with_skip_worktree(fs : &FileSystem, git_dir : String, entries : Array[IndexEntry], skip_worktree_paths : Map[String, Bool], hash_size? : Int) -> Unit raise GitErrorfn write_index_entries_with_tree(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, entries : Array[IndexEntry], tree_id : ObjectId) -> Unit raise GitErrorfn write_index_stage_entries(fs : &FileSystem, git_dir : String, entries : Array[IndexStageEntry], hash_size? : Int) -> Unit raise GitErrorfn write_loose_object(fs : &FileSystem, git_dir : String, obj_type : ObjectType, content : Bytes, algo? : HashAlgorithm) -> ObjectId raise GitErrorfn write_object_bytes(fs : &FileSystem, git_dir : String, id : ObjectId, compressed : Bytes) -> Unit raise GitErrorfn write_skip_worktree_paths(fs : &FileSystem, git_dir : String, paths : Array[String]) -> Unit raise GitErrorfn write_sparse_patterns(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, patterns : Array[String]) -> Unit raise GitErrorfn write_subdir_attributes(fs : &FileSystem, git_dir : String, remote_url : String, subdir_path : String, base_commit : ObjectId) -> Unitfn write_tree_from_index(fs : &FileSystem, rfs : &RepoFileSystem, git_dir : String, entries : Array[IndexEntry], prefix? : String?, missing_ok? : Bool, algo? : HashAlgorithm) -> ObjectId raise GitErrorfn write_tree_to_worktree(db : ObjectDb, rfs : &RepoFileSystem, wfs : &FileSystem, tree_id : ObjectId, dir : String) -> Unit raise GitErrorfn write_worktree_and_build_index(db : ObjectDb, fs : &FileSystem, rfs : &RepoFileSystem, root : String, git_dir : String, files : Map[String, TreeFileEntry], remove_missing? : Bool, preserve_removed_gitlinks? : Bool) -> Array[IndexEntry] raise GitErrorfn write_worktree_from_files(db : ObjectDb, fs : &FileSystem, rfs : &RepoFileSystem, root : String, git_dir : String, files : Map[String, TreeFileEntry], remove_missing? : Bool, preserve_removed_gitlinks? : Bool) -> Unit raise GitErrorPorcelain (gix-equivalent): high-level Git operations facade
Dependencies