/mgit

minigit, "mgit", a feature-poor version of git written in rust

Primary LanguageRust

mgit

Setup

  • cargo new mgit --bin
  • add mgit to PATH: export PATH=$PATH:~/src/mgit/target/release/
  • add /.idea/ to .gitignore

Functionality

  • mgit
    • init Create an empty Git repository
    • add Add file contents to the index
    • commit Record changes to the repository
    • status Show the working tree status
    • cat-file -p Show the decompressed contents of an mgit object
    • log Show commit logs

Interesting

Make lots of objects

for i in `seq 1 1000`;
do
    RAND="$(openssl rand -base64 4)"
    echo ${RAND} > some_file.txt
    mgit add some_file.txt
done