Skip to content

A clone of git in the NanoVC style. This is the precursor to NanoVC. This was the inspiration for NanoVC.

License

Notifications You must be signed in to change notification settings

nanovc/nanovc-git-inspiration-java

Repository files navigation

nanovc-git-inspiration-java

NanoVC Git Inspiration Java Implementation

Java implementation of Nano Version Control inspired by Git.

We copied the git design as described in the Git Pro hand book, "Git Internals" chapter. We did this so that we could learn from the git design as-is.

The web page describing Nano Version Control is here: http://nanovc.io

To understand the basic idea, look at this blog post: http://nanovc.io/2020/05/25/the-basic-idea/

Getting Started Example

 public void testHelloWorld()
 {
        // Get a new engine for a repo:
        RepoHandler nano = NanoVersionControl.newHandler();

        // Create a new repository:
        Repo repo = nano.init();
        nano.setAuthorAndCommitter("test");

        // Add content to the working area:
        ContentBase rootContent = repo.workingArea.putContent("/", (byte) 123);

        // Add the changed content to the staging area:
        nano.addAll(true);

        Commit commit = nano.commitAll("test", true);
        Assert.assertNotNull(commit);
        Assert.assertNotNull(commit.hash.value);
 }

About

A clone of git in the NanoVC style. This is the precursor to NanoVC. This was the inspiration for NanoVC.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages