forked from mirrors/jj
git_backend: ensure that no-gc ref target never conflicts
This commit is contained in:
parent
f66c859fe4
commit
48c4985e34
1 changed files with 1 additions and 1 deletions
|
@ -594,7 +594,7 @@ fn prevent_gc(git_repo: &gix::Repository, id: &CommitId) -> Result<(), BackendEr
|
|||
fn to_no_gc_ref_update(id: &CommitId) -> gix::refs::transaction::RefEdit {
|
||||
let name = format!("{NO_GC_REF_NAMESPACE}{}", id.hex());
|
||||
let new = gix::refs::Target::Peeled(validate_git_object_id(id).unwrap());
|
||||
let expected = gix::refs::transaction::PreviousValue::Any;
|
||||
let expected = gix::refs::transaction::PreviousValue::ExistingMustMatch(new.clone());
|
||||
gix::refs::transaction::RefEdit {
|
||||
change: gix::refs::transaction::Change::Update {
|
||||
log: gix::refs::transaction::LogChange {
|
||||
|
|
Loading…
Reference in a new issue