Skip to content
Snippets Groups Projects
Commit b26b6e98 authored by Georges Racinet's avatar Georges Racinet
Browse files

rhgitaly::gitlab::gitlab_branch_ref

This parallels Python's `heptapod.branch.gitlab_branch_ref`.
parent 34c89478
No related branches found
No related tags found
2 merge requests!189Merged stable branch into default and bumped VERSION,!187RHGitaly: implement RefService.FindDefaultBranch
......@@ -5,3 +5,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pub mod revision;
pub mod state;
const GITLAB_BRANCH_REF_PREFIX: &[u8] = b"refs/heads/";
// Return the full GitLab ref path of a GitLab branch
pub fn gitlab_branch_ref(name: &[u8]) -> Vec<u8> {
let mut res = GITLAB_BRANCH_REF_PREFIX.to_vec();
res.extend_from_slice(name);
res
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment