Skip to content

Commit 348909b

Browse files
committed
Add repo-style 'm/<manifest branch>' tags
Implements #113
1 parent 542c033 commit 348909b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tree.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ impl Tree {
756756
for project in &projects {
757757
let lfs_projects = &lfs_projects;
758758
let project_path = tree_root.join(&project.project_path);
759+
let manifest_branch = self.config.branch.clone();
759760

760761
job.add_task(&project.project_path, move || {
761762
let remote = config
@@ -846,6 +847,10 @@ impl Tree {
846847
.reset(new_head.as_object(), git2::ResetType::Soft, None)
847848
.with_context(|| format!("failed to move HEAD to {:?}", new_head))?;
848849
}
850+
851+
// Create a 'm/<manifest branch>' tag pointing to this commit.
852+
let tag_name = format!("m/{}", manifest_branch);
853+
repo.tag_lightweight(&tag_name, new_head.as_object(), true)?;
849854
} else {
850855
depot.clone_repo(remote, project_name, revision, &project_path)?;
851856
}

0 commit comments

Comments
 (0)