mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-11 06:42:47 +00:00
git: do not export new ref if racy process created one with the same name
Since we've checked the ref doesn't exist in this code path, I think it's better to not overwrite the existing ref.
This commit is contained in:
parent
a4dd598e3e
commit
89f1d83a22
1 changed files with 1 additions and 1 deletions
|
@ -603,7 +603,7 @@ fn update_git_ref(
|
|||
} else {
|
||||
// The branch was added in jj but still doesn't exist in git, so add it
|
||||
git_repo
|
||||
.reference(git_ref_name, new_oid, true, "export from jj")
|
||||
.reference(git_ref_name, new_oid, false, "export from jj")
|
||||
.map_err(FailedRefExportReason::FailedToSet)?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue