def write(content, type = :blob)
      if content.kind_of? MultiGit::Builder
        return content >> self
      end
      validate_type(type)
      oid = nil
      if content.kind_of? MultiGit::Object
        if include?(content.oid)
          return read(content.oid)
        end
        content = content.to_io
      end
      if content.respond_to? :path
        oid = @git["hash-object",:t, type.to_s,:w,'--', content.path].chomp
      else
        content = content.read if content.respond_to? :read
        @git.call('hash-object',:t,type.to_s, :w, :stdin) do |stdin, stdout|
          stdin.write(content)
          stdin.close
          oid = stdout.read.chomp
        end
      end
      return OBJECT_CLASSES[type].new(self,oid)
    end
def write(content, type = :blob)
      if content.kind_of? MultiGit::Builder
        return content >> self
      end
      validate_type(type)
      oid = nil
      if content.kind_of? MultiGit::Object
        if include?(content.oid)
          return read(content.oid)
        end
        content = content.to_io
      end
      if content.respond_to? :path
        oid = @git["hash-object",:t, type.to_s,:w,'--', content.path].chomp
      else
        content = content.read if content.respond_to? :read
        @git.call('hash-object',:t,type.to_s, :w, :stdin) do |stdin, stdout|
          stdin.write(content)
          stdin.close
          oid = stdout.read.chomp
        end
      end
      return OBJECT_CLASSES[type].new(self,oid)
    end
{include:MultiGit::Repository#write}
 @param (see MultiGit::Repository#write)
 @raise (see MultiGit::Repository#write)
 @return (see MultiGit::Repository#write)