mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 07:14:38 +00:00
tree_builder: rename repo()
to more accurate store()
This commit is contained in:
parent
acf3798abc
commit
76c58b3949
2 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@ pub fn write_file(store: &Store, path: &RepoPath, contents: &str) -> FileId {
|
|||
}
|
||||
|
||||
pub fn write_normal_file(tree_builder: &mut TreeBuilder, path: &RepoPath, contents: &str) {
|
||||
let id = write_file(tree_builder.repo(), path, contents);
|
||||
let id = write_file(tree_builder.store(), path, contents);
|
||||
tree_builder.set(
|
||||
path.clone(),
|
||||
TreeValue::Normal {
|
||||
|
@ -86,7 +86,7 @@ pub fn write_normal_file(tree_builder: &mut TreeBuilder, path: &RepoPath, conten
|
|||
}
|
||||
|
||||
pub fn write_executable_file(tree_builder: &mut TreeBuilder, path: &RepoPath, contents: &str) {
|
||||
let id = write_file(tree_builder.repo(), path, contents);
|
||||
let id = write_file(tree_builder.store(), path, contents);
|
||||
tree_builder.set(
|
||||
path.clone(),
|
||||
TreeValue::Normal {
|
||||
|
@ -97,7 +97,7 @@ pub fn write_executable_file(tree_builder: &mut TreeBuilder, path: &RepoPath, co
|
|||
}
|
||||
|
||||
pub fn write_symlink(tree_builder: &mut TreeBuilder, path: &RepoPath, target: &str) {
|
||||
let id = tree_builder.repo().write_symlink(path, target).unwrap();
|
||||
let id = tree_builder.store().write_symlink(path, target).unwrap();
|
||||
tree_builder.set(path.clone(), TreeValue::Symlink(id));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ impl TreeBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn repo(&self) -> &Store {
|
||||
pub fn store(&self) -> &Store {
|
||||
self.store.as_ref()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue