t5404: relax overzealous test
[gitweb.git] / sha1_name.c
index 776101e8d709b924033a141efa38e3f734837c79..ca7ddd6f2cf7074a1d74e011c2bd260c2ae6ffe6 100644 (file)
@@ -1214,6 +1214,15 @@ int get_sha1(const char *name, unsigned char *sha1)
        return get_sha1_with_context(name, 0, sha1, &unused);
 }
 
+/*
+ * This is like "get_sha1()", but for struct object_id.
+ */
+int get_oid(const char *name, struct object_id *oid)
+{
+       return get_sha1(name, oid->hash);
+}
+
+
 /*
  * Many callers know that the user meant to name a commit-ish by
  * syntactical positions where the object name appears.  Calling this