The create-only publication ref for a binding id (RFC §8.6): `refs/atomic/bindings/ / ` with a two-hex-character shard.
(id: &BindingId)
| 123 | /// The create-only publication ref for a binding id (RFC §8.6): |
| 124 | /// `refs/atomic/bindings/<shard>/<id>` with a two-hex-character shard. |
| 125 | pub fn binding_ref_name(id: &BindingId) -> String { |
| 126 | let hex = id.to_hex(); |
| 127 | format!("{BINDING_REF_PREFIX}{}/{hex}", &hex[..2]) |
| 128 | } |
| 129 | |
| 130 | /// The create-only publication ref for this binding. |
| 131 | pub fn publication_ref_name(&self, binding: &GitStateBinding) -> String { |