pub fn delete_ref_dropping_history(
layout: &RepoLayout,
branch: &str,
) -> Result<(), RefError>Expand description
mkit branch -m helper: deletes the OLD name’s ref after a rename
and, on --features history-mmr builds, also destroys its history-MMR
journal partition (issue #648).
Unlike delete_ref_recording_history, this does NOT refuse the
checked-out branch — branch -m legitimately renames the current
branch and moves HEAD to the new name immediately after this call.
The NEW name’s ref is created first by the caller (via
write_ref_recording_history, which seeds it with a fresh
journal), so by the time this runs the old and new incarnations are
already disjoint; this just makes sure the OLD name’s journal is not
left behind to be inherited by a future branch of the same name.
- Default build (no
history-mmr) — exactlyrefs::delete_ref(layout, branch). --features history-mmr— routes throughmkit_core::refs::delete_ref_with_history.