实现:init命令

This commit is contained in:
mrbeanc
2023-12-17 15:41:20 +08:00
parent e1b21b66af
commit 03d5c815f2
4 changed files with 50 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
use clap::{Parser, Subcommand};
use mit::commands::init::init;
/// Rust实现的简易版本的Git用于学习Rust语言
#[derive(Parser)]
@@ -42,7 +43,7 @@ pub fn handle_command() {
let cli = Cli::parse();
match cli.command {
Command::Init => {
println!("init");
let _ = init();
}
Command::Add { files , all } => {
if files.contains(&".".to_string()) || all {