radicle-surf
A code surfing library for VCS file systems 🏄♀️🏄♂️
Welcome to radicle-surf
!
radicle-surf
is a system to describe a file-system in a VCS world.
We have the concept of files and directories, but these objects can change over time while people iterate on them.
Thus, it is a file-system within history and we, the user, are viewing the file-system at a particular snapshot.
Alongside this, we will wish to take two snapshots and view their differences.
Let's start surfing (and apologies for the unwrap
s):
use ;
use ;
// We're going to point to this repo.
let repo = new.unwrap;
// Here we initialise a new Broswer for a the git repo.
let browser = new.unwrap;
// Get the snapshot of the directory for our current
// HEAD of history.
let directory = browser.get_directory.unwrap;
// Let's get a Path to this file
let this_file = with_root;
// And assert that we can find it!
assert!;
let mut root_contents = directory.list_directory;
root_contents.sort;
assert_eq!;
let src = directory.find_directory.unwrap;
let mut src_contents = src.list_directory;
src_contents.sort;
assert_eq!;