remove unused repository method

This commit is contained in:
Kiril Videlov 2024-05-28 23:20:26 +02:00
parent ce5e57d5ac
commit cc5e0bd8bd

View File

@ -43,19 +43,6 @@ impl Repository {
Ok(Repository(inner))
}
pub fn add_disk_alternate<P: AsRef<Path>>(&self, path: P) -> Result<()> {
let alternates_path = self.0.path().join("objects/info/alternates");
if !alternates_path.exists() {
let path = path.as_ref().normalize();
let mut alternates_file = std::fs::File::create(&alternates_path)?;
alternates_file.write_all(path.as_path().as_os_str().as_encoded_bytes())?;
alternates_file.write_all(b"\n")?;
self.0.odb().and_then(|odb| odb.refresh())?;
}
Ok(())
}
pub fn add_submodule<P: AsRef<Path>>(&self, url: &Url, path: P) -> Result<Submodule<'_>> {
self.0
.submodule(&url.to_string(), path.as_ref(), false)