 	}
 }
 
-public func == (lhs: Pointer, rhs: Pointer) -> Bool {
-	switch (lhs, rhs) {
-	case (.Commit, .Commit), (.Tree, .Tree), (.Blob, .Blob), (.Tag, .Tag):
-		return lhs.oid == rhs.oid
-	default:
-		return false
-	}
-}
-
 /// A git object.
 public protocol ObjectType {
 	/// The OID of the object.

		}
	}
	
	init?(oid: OID, type: git_otype) {
		switch type.value {
		case GIT_OBJ_COMMIT.value:

import Foundation

/// A pointer to a git object.
public protocol PointerType: Equatable, Hashable {
	/// The OID of the referenced object.
	var oid: OID { get }
	
	/// The libgit2 `git_otype` of the referenced object.
	var type: git_otype { get }
}

public func == <P: PointerType>(lhs: P, rhs: P) -> Bool {
	return lhs.oid == rhs.oid && lhs.type.value == rhs.type.value
}

/// A pointer to a git object.
public enum Pointer: PointerType {
	case Commit(OID)
	case Tree(OID)
	case Blob(OID)
	case Tag(OID)
	
	public var oid: OID {
		switch self {
		case let Commit(oid):
			return oid
