Skip to content
/ get Public

Oversimplified git implementation made with rust.

Notifications You must be signed in to change notification settings

shved/get

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A terrible code made just to get comfortible with rust semantics and std lib facilities.

There are a lot of things I don't like about this project, but the good part is where I had to make it work with tree structure and in Rust it is a kind of challenge. But in this particular case the trees only purpose is to connect files, perform some calculation (like digests for objects) and put files back to disk. This is perfect circumstances to use Vec where nodes point to each other using element index instead of a real linked tree structure which would be both terrible and unnecessary.

TODO:

  • init
  • refactor it to split bin command and lib implementation
  • commit
  • refactor error handling so every call to lib returns result to the top level and panics are handled with proper exit code in main.rs and all the success messages are printed by main.rs. fight unwraps
  • start doing tests ^_^
  • restore
  • extract all the path variables to call config to not pass root_path through all the calls
  • make it compare ignore entries to path segments to equality (https://doc.rust-lang.org/std/path/struct.Path.html#method.components)
  • make it work from any place, not just repo root directory (using Path.ancestors, check it in paths mod)
  • .get.toml file with all the repo preferences (including getignore) and store options in static segment
  • rework it all to work with structs, remove shared state
  • change default commit message to something sensible (a timestamp? files changed?)
  • rework tests to use ramfs
  • add doc comments
  • remake blob content to be a byte slice to support arbitrary binary data, not just utf-8 text files.
  • commit log
  • delete last commit
  • diff
  • branches
  • research and maybe set update timestamp to restored files to the time from extra gzip header segment
  • push/pull via ssh + conflicts detection
  • handle interrupt signal trying to clean up after the current job is interrupted
  • command to delete dangling objects (gc)
  • support multiline commit message
  • deal with empty folders (not needed)
  • lock repo with .get/lock file

About

Oversimplified git implementation made with rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages