Merge branch 'nd/get-oid-with-context-returns-an-enum'
authorJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 02:18:41 +0000 (18:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 02:18:41 +0000 (18:18 -0800)
* nd/get-oid-with-context-returns-an-enum:
get_oid_with_context(): match prototype and implementation

sha1-name.c
index d1cc77c124c11ffd49be472b1368baeda3afbe17..6dda2c16df1026e50b7d9be255b6bbfc4e92725c 100644 (file)
@@ -1820,9 +1820,11 @@ void maybe_die_on_misspelt_object_name(const char *name, const char *prefix)
                               prefix, &oid, &oc);
 }
 
-int get_oid_with_context(struct repository *repo, const char *str,
-                        unsigned flags, struct object_id *oid,
-                        struct object_context *oc)
+enum get_oid_result get_oid_with_context(struct repository *repo,
+                                        const char *str,
+                                        unsigned flags,
+                                        struct object_id *oid,
+                                        struct object_context *oc)
 {
        if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE)
                BUG("incompatible flags for get_sha1_with_context");