]>
git.proxmox.com Git - libgit2.git/blob - src/errors.c
2 #include "thread-utils.h" /* for GIT_TLS */
8 {GIT_ERROR
, "Unspecified error"},
9 {GIT_ENOTOID
, "Input was not a properly formatted Git object id."},
10 {GIT_ENOTFOUND
, "Object does not exist in the scope searched."},
11 {GIT_ENOMEM
, "Not enough space available."},
12 {GIT_EOSERR
, "Consult the OS error information."},
13 {GIT_EOBJTYPE
, "The specified object is of invalid type"},
14 {GIT_EOBJCORRUPTED
, "The specified object has its data corrupted"},
15 {GIT_ENOTAREPO
, "The specified repository is invalid"},
16 {GIT_EINVALIDTYPE
, "The object type is invalid or doesn't match"},
17 {GIT_EMISSINGOBJDATA
, "The object cannot be written that because it's missing internal data"},
18 {GIT_EPACKCORRUPTED
, "The packfile for the ODB is corrupted"},
19 {GIT_EFLOCKFAIL
, "Failed to adquire or release a file lock"},
20 {GIT_EZLIB
, "The Z library failed to inflate/deflate an object's data"},
21 {GIT_EBUSY
, "The queried object is currently busy"},
22 {GIT_EINVALIDPATH
, "The path is invalid"},
23 {GIT_EBAREINDEX
, "The index file is not backed up by an existing repository"},
24 {GIT_EINVALIDREFNAME
, "The name of the reference is not valid"},
25 {GIT_EREFCORRUPTED
, "The specified reference has its data corrupted"},
26 {GIT_ETOONESTEDSYMREF
, "The specified symbolic reference is too deeply nested"},
27 {GIT_EPACKEDREFSCORRUPTED
, "The pack-refs file is either corrupted of its format is not currently supported"},
28 {GIT_EINVALIDPATH
, "The path is invalid" },
29 {GIT_EREVWALKOVER
, "The revision walker is empty; there are no more commits left to iterate"},
30 {GIT_EINVALIDREFSTATE
, "The state of the reference is not valid"},
31 {GIT_ENOTIMPLEMENTED
, "This feature has not been implemented yet"}
34 const char *git_strerror(int num
)
38 if (num
== GIT_EOSERR
)
39 return strerror(errno
);
40 for (i
= 0; i
< ARRAY_SIZE(error_codes
); i
++)
41 if (num
== error_codes
[i
].num
)
42 return error_codes
[i
].str
;
44 return "Unknown error";