Esempio n. 1
0
        private RevObject WriteBlob(Core.Repository repo, string data)
        {
            var revWalk = new GitSharp.Core.RevWalk.RevWalk(repo);

            byte[]   bytes = Constants.encode(data);
            var      ow    = new ObjectWriter(repo);
            ObjectId id    = ow.WriteBlob(bytes);

            try
            {
                Parse(id);
                Assert.Fail("Object " + id.Name + " should not exist in test repository");
            }
            catch (MissingObjectException)
            {
                // Ok
            }

            return(revWalk.lookupBlob(id));
        }
Esempio n. 2
0
 protected RevBlob blob(string content)
 {
     return(rw.lookupBlob(_ow.WriteBlob(Constants.encode(content))));
 }
Esempio n. 3
0
        private RevObject WriteBlob(Core.Repository repo, string data)
        {
            var revWalk = new GitSharp.Core.RevWalk.RevWalk(repo);
            byte[] bytes = Constants.encode(data);
            var ow = new ObjectWriter(repo);
            ObjectId id = ow.WriteBlob(bytes);
            try
            {
                Parse(id);
                Assert.Fail("Object " + id.Name + " should not exist in test repository");
            }
            catch (MissingObjectException)
            {
                // Ok
            }

            return revWalk.lookupBlob(id);
        }