Ejemplo n.º 1
0
	    private DirCacheEntry MakeEntry(String path, FileMode mode, String content)
        {
		    DirCacheEntry ent = new DirCacheEntry(path);
		    ent.setFileMode(mode);
		    byte[] contentBytes = Constants.encode(content);
		    ent.setObjectId(new ObjectWriter(db).ComputeBlobSha1(contentBytes.Length, new MemoryStream(contentBytes)));
		    return ent;
	    }
 private DirCacheEntry makeEntry(string path, FileMode mode)
 {
     byte[] pathBytes = Constants.encode(path);
     DirCacheEntry ent = new DirCacheEntry(path);
     ent.setFileMode(mode);
     ent.setObjectId(new ObjectWriter(db).ComputeBlobSha1(pathBytes.Length, new MemoryStream(pathBytes)));
     return ent;
 }