Add repo rename command
This commit is contained in:
parent
357de970ee
commit
3390526522
4 changed files with 32 additions and 3 deletions
|
|
@ -13,8 +13,8 @@ pub use crate::repo::VERSION as REPO_VERSION;
|
|||
pub use self::{
|
||||
datadir::{LockedDataDir, UnlockedDataDir},
|
||||
v1::{
|
||||
State, VERSION, add_repo, load_repo, load_repo_version, load_state, remove_repo, save_repo,
|
||||
select_repo, tidy,
|
||||
State, VERSION, add_repo, load_repo, load_repo_version, load_state, remove_repo,
|
||||
rename_repo, save_repo, select_repo, tidy,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ pub fn remove_repo(dir: &LockedDataDir, id: RepoId) -> anyhow::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_repo_name(dir: &LockedDataDir, id: RepoId, name: String) -> anyhow::Result<()> {
|
||||
pub fn rename_repo(dir: &LockedDataDir, id: RepoId, name: String) -> anyhow::Result<()> {
|
||||
let mut state = load_state(dir)?;
|
||||
*state
|
||||
.repos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue