module documentation
Git filter-branch implementation.
| Class | |
TypedDict for commit data fields. |
| Class | |
Filter for rewriting commits during filter-branch operations. |
| Function | filter |
Filter commits reachable from the given refs. |
def filter_refs(refs:
RefsContainer, object_store: BaseObjectStore, ref_names: Sequence[ bytes], commit_filter: CommitFilter, *, keep_original: bool = True, force: bool = False, tag_callback: Callable[ [ Ref, Ref], None] | None = None) -> dict[ ObjectID, ObjectID]:
ΒΆ
Filter commits reachable from the given refs.
| Parameters | |
refs:RefsContainer | Repository refs container |
objectBaseObjectStore | Object store containing commits |
refSequence[ | List of ref names to filter |
commitCommitFilter | CommitFilter instance to use |
keepbool | Keep original refs under refs/original/ |
force:bool | Force operation even if refs have been filtered before |
tagCallable[ | Optional callback for processing tags |
| Returns | |
dict[ | Dictionary mapping old commit SHAs to new commit SHAs |
| Raises | |
ValueError | If refs have already been filtered and force is False |