Skip to content

tsiklic1/git-in-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository implements the following git commands from scratch in rust:

  • init
  • commit
  • cat-file
  • hash-object
  • ls-tree
  • write-tree
  • commit-tree

including only the core functionality (no fancy flags).

git init

git: git init

git-in-rust: cargo run -- init

git commit

only -m flag

git: git commit -m "Committing hard"

git-in-rust: cargo run -- cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

git cat-file

only -p flag

git: git cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

git-in-rust: cargo run -- cat-file -p e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

git hash-object

only -w flag

git: git hash-object -w test.txt

git-in-rust: cargo run -- hash-object -w test.txt

git ls-tree

only --name-only flag

git: git ls-tree --name-only 825dc642cb6eb9a060e54bf8d69288fbee4904

git-in-rust: cargo run -- ls-tree --name-only 825dc642cb6eb9a060e54bf8d69288fbee4904

git write-tree

git: git write-tree

git-in-rust: cargo run -- write-tree

git commit-tree

only -m and -p flags

git: git commit-tree 825dc642cb6eb9a060e54bf8d69288fbee4904 -p f6ef0ed87e78ca3c0262fbb887053940d1a0275d -m "Committing hard"

git-in-rust: cargo run -- commit-tree 825dc642cb6eb9a060e54bf8d69288fbee4904 -p f6ef0ed87e78ca3c0262fbb887053940d1a0275d -m "Committing hard"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages