Git.Core.ObjectStore.Checkout C# (CSharp) Method

Checkout() public method

Get a commit and from there start the checkout
public Checkout ( string baseDir, Commit commit ) : void
baseDir string
commit Commit /// A ///
return void
        public void Checkout(string baseDir, Commit commit)
        {
            throw new NotImplementedException ("This is not yet implemented");
        }

Same methods

ObjectStore::Checkout ( string baseDir, Tree tree ) : void

Usage Example

Example #1
0
        public static void CheckoutTest(string hash, string objStorePath)
        {
            ObjectStore store = new ObjectStore (objStorePath);

            SHA1 id = new SHA1 (SHA1.FromHexString (hash), false);

            Console.WriteLine ("Hash: " + hash);
            Console.WriteLine ("Id:   " + id.ToHexString ());

            Console.WriteLine ("hash created");

            Tree tree = (Tree) store.Get (id);

            Console.WriteLine ("tree created No. entries: " + tree.Entries.Length);

            store.Checkout (Environment.CurrentDirectory, tree);

            Console.WriteLine ("Checkout done WIIIII!!!");
        }