diff --git a/src/git.rs b/src/git.rs index 65549d5..6efefa2 100644 --- a/src/git.rs +++ b/src/git.rs @@ -12,7 +12,7 @@ pub enum GitCommand { }, /// List all repositories in breadpi. - List, + Ls, /// Delete the specified repository in breadpi. Delete { @@ -63,6 +63,19 @@ pub async fn handle_git(cmd: &GitCommand) { ); } + GitCommand::Ls => { + let ls = session.command("ls") + .arg("store/") + .arg("|") + .arg("cat") + .output().await.unwrap(); + + eprintln!( + "{}", + String::from_utf8(ls.stdout).expect("Failed to rm repo.") + ); + } + GitCommand::Add { name } => { add_remote_to_repo(name.to_string()); } _ => {