feat: adding commit, show commands
CI checks / Clippy (push) Successful in 26s
CI checks / Format (push) Successful in 25s

This commit is contained in:
mycroft committed 2025-02-05 21:55:05 +01:00
1 parent 49ed740014
commit 62af81b28f
4 files changed
+136 -5

No files matched your search

+3 -3
View File
@@ -2,7 +2,7 @@ use anyhow::Result;
use std::{
env,
fs::{create_dir, read_to_string},
path::PathBuf,
path::{Path, PathBuf},
};
pub struct Repository {
@@ -42,8 +42,8 @@ impl Repository {
Ok(true)
}
pub fn init_repository(&mut self, path: &PathBuf) -> Result<PathBuf> {
self.path = path.clone();
pub fn init_repository(&mut self, path: &Path) -> Result<PathBuf> {
self.path = path.to_path_buf();
let git_dir = self.path.join(".git");
create_dir(&git_dir)?;