Skip to main content

write_ref

Function write_ref 

Source
pub fn write_ref(git_dir: &Path, refname: &str, oid: &ObjectId) -> Result<()>
Expand description

Write a ref, creating parent directories as needed.

Dispatches to the reftable backend when extensions.refStorage = reftable.

§Parameters

  • git_dir — path to the git directory.
  • refname — reference name (e.g. "refs/heads/main").
  • oid — the new target object ID.

§Errors

Returns Error::Io on filesystem errors.