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

Get() public method

public Get ( string hexstring ) : Object
hexstring string
return Object
        public Object Get(string hexstring)
        {
            return Get (new SHA1 (SHA1.FromHexString (hexstring), false));
        }

Same methods

ObjectStore::Get ( SHA1 key ) : Object

Usage Example

Beispiel #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!!!");
        }