mirror of
https://github.com/git/git
synced 2024-07-07 19:39:27 +00:00
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>
This commit is contained in:
parent
243a4c7e27
commit
127b48f99f
|
@ -1820,8 +1820,10 @@ void maybe_die_on_misspelt_object_name(const char *name, const char *prefix)
|
||||||
prefix, &oid, &oc);
|
prefix, &oid, &oc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_oid_with_context(struct repository *repo, const char *str,
|
enum get_oid_result get_oid_with_context(struct repository *repo,
|
||||||
unsigned flags, struct object_id *oid,
|
const char *str,
|
||||||
|
unsigned flags,
|
||||||
|
struct object_id *oid,
|
||||||
struct object_context *oc)
|
struct object_context *oc)
|
||||||
{
|
{
|
||||||
if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE)
|
if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user