summaryrefslogtreecommitdiff
path: root/sha1-name.c
diff options
context:
space:
mode:
authorDuy Nguyen <pclouds@gmail.com>2019-02-12 12:43:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-12 18:14:56 (GMT)
commit127b48f99fb39736b3b8da1a81ec4f7dcf1d7f63 (patch)
tree52e0d01d627db1e80c1030e5e5464b2d166012f9 /sha1-name.c
parent243a4c7e274ea060ea35c5dc6701e2cf918e0f29 (diff)
downloadgit-127b48f99fb39736b3b8da1a81ec4f7dcf1d7f63.zip
git-127b48f99fb39736b3b8da1a81ec4f7dcf1d7f63.tar.gz
git-127b48f99fb39736b3b8da1a81ec4f7dcf1d7f63.tar.bz2
get_oid_with_context(): match prototype and implementation
The get_oid_with_context() function is declared to return an enum in cache.h, but defined to return an int in sha1-name.c. The compiler notices this on AIX and rejects the build, since d1dd94b308 (Do not print 'dangling' for cat-file in case of ambiguity - 2019-01-17) was merged. Return the correct type from the implementation to fix this. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-name.c')
-rw-r--r--sha1-name.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sha1-name.c b/sha1-name.c
index d1cc77c..6dda2c1 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -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");