Skip to content

Commit

Permalink
test first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Madalosso committed Nov 12, 2024
1 parent 20355d0 commit 71b7411
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ fn main() {
eprintln!("Logs from your program will appear here!");

// Uncomment this block to pass the first stage
// let args: Vec<String> = env::args().collect();
// if args[1] == "init" {
// fs::create_dir(".git").unwrap();
// fs::create_dir(".git/objects").unwrap();
// fs::create_dir(".git/refs").unwrap();
// fs::write(".git/HEAD", "ref: refs/heads/main\n").unwrap();
// println!("Initialized git directory")
// } else {
// println!("unknown command: {}", args[1])
// }
let args: Vec<String> = env::args().collect();
if args[1] == "init" {
fs::create_dir(".git").unwrap();
fs::create_dir(".git/objects").unwrap();
fs::create_dir(".git/refs").unwrap();
fs::write(".git/HEAD", "ref: refs/heads/main\n").unwrap();
println!("Initialized git directory")
} else {
println!("unknown command: {}", args[1])
}
}

0 comments on commit 71b7411

Please sign in to comment.