commit - 39d5d1d2ed506dd6463430eb1311f4d96a66e6ae
commit + 70cc983209a406b57dc37c4515e1cb9a038e0f2c
blob - 020d902fa5e38787f662f34a05d1a3b2472f3443
blob + 15a27715685e7d137844ebe2be87a33d550d6f96
--- include/got_error.h
+++ include/got_error.h
#define GOT_ERR_HUNK_FAILED 150
#define GOT_ERR_PATCH_FAILED 151
-static const struct got_error {
- int code;
- const char *msg;
-} got_errors[] = {
- { GOT_ERR_OK, "no error occured?!?" },
- { GOT_ERR_ERRNO, "see errno" },
- { GOT_ERR_NOT_GIT_REPO, "no git repository found" },
- { GOT_ERR_BAD_FILETYPE, "bad file type" },
- { GOT_ERR_BAD_PATH, "bad path" },
- { GOT_ERR_NOT_REF, "no such reference found" },
- { GOT_ERR_IO, "input/output error" },
- { GOT_ERR_EOF, "unexpected end of file" },
- { GOT_ERR_DECOMPRESSION,"decompression failed" },
- { GOT_ERR_NO_SPACE, "buffer too small" },
- { GOT_ERR_BAD_OBJ_HDR, "bad object header" },
- { GOT_ERR_OBJ_TYPE, "wrong type of object" },
- { GOT_ERR_BAD_OBJ_DATA, "bad object data" },
- { GOT_ERR_AMBIGUOUS_ID, "ambiguous object ID" },
- { GOT_ERR_BAD_PACKIDX, "bad pack index file" },
- { GOT_ERR_PACKIDX_CSUM, "pack index file checksum error" },
- { GOT_ERR_BAD_PACKFILE, "bad pack file" },
- { GOT_ERR_NO_OBJ, "object not found" },
- { GOT_ERR_NOT_IMPL, "feature not implemented" },
- { GOT_ERR_OBJ_NOT_PACKED,"object is not packed" },
- { GOT_ERR_BAD_DELTA_CHAIN,"bad delta chain" },
- { GOT_ERR_BAD_DELTA, "bad delta" },
- { GOT_ERR_COMPRESSION, "compression failed" },
- { GOT_ERR_BAD_OBJ_ID_STR,"bad object id string" },
- { GOT_ERR_WORKTREE_EXISTS,"worktree already exists" },
- { GOT_ERR_WORKTREE_META,"bad worktree meta data" },
- { GOT_ERR_WORKTREE_VERS,"unsupported worktree format version" },
- { GOT_ERR_WORKTREE_BUSY,"worktree already locked" },
- { GOT_ERR_FILE_OBSTRUCTED,"file is obstructed" },
- { GOT_ERR_RECURSION, "recursion limit reached" },
- { GOT_ERR_TIMEOUT, "operation timed out" },
- { GOT_ERR_INTERRUPT, "operation interrupted" },
- { GOT_ERR_PRIVSEP_READ, "no data received in imsg" },
- { GOT_ERR_PRIVSEP_LEN, "unexpected amount of data received in imsg" },
- { GOT_ERR_PRIVSEP_PIPE, "privsep peer process closed pipe" },
- { GOT_ERR_PRIVSEP_NO_FD,"privsep file descriptor unavailable" },
- { GOT_ERR_PRIVSEP_MSG, "received unexpected privsep message" },
- { GOT_ERR_PRIVSEP_DIED, "unprivileged process died unexpectedly" },
- { GOT_ERR_PRIVSEP_EXIT, "bad exit code from unprivileged process" },
- { GOT_ERR_PACK_OFFSET, "bad offset in pack file" },
- { GOT_ERR_OBJ_EXISTS, "object already exists" },
- { GOT_ERR_BAD_OBJ_ID, "bad object id" },
- { GOT_ERR_ITER_BUSY, "iteration already in progress" },
- { GOT_ERR_ITER_COMPLETED,"iteration completed" },
- { GOT_ERR_RANGE, "value out of range" },
- { GOT_ERR_EXPECTED, "expected an error but have no error" },
- { GOT_ERR_CANCELLED, "operation in progress has been cancelled" },
- { GOT_ERR_NO_TREE_ENTRY,"no such entry found in tree" },
- { GOT_ERR_FILEIDX_SIG, "bad file index signature" },
- { GOT_ERR_FILEIDX_VER, "unknown file index format version" },
- { GOT_ERR_FILEIDX_CSUM, "bad file index checksum" },
- { GOT_ERR_PATH_PREFIX, "worktree already contains items from a "
- "different path prefix" },
- { GOT_ERR_ANCESTRY, "target commit is on a different branch" },
- { GOT_ERR_FILEIDX_BAD, "file index is corrupt" },
- { GOT_ERR_BAD_REF_DATA, "could not parse reference data" },
- { GOT_ERR_TREE_DUP_ENTRY,"duplicate entry in tree object" },
- { GOT_ERR_DIR_DUP_ENTRY,"duplicate entry in directory" },
- { GOT_ERR_NOT_WORKTREE, "no got work tree found" },
- { GOT_ERR_UUID_VERSION, "bad uuid version" },
- { GOT_ERR_UUID_INVALID, "uuid invalid" },
- { GOT_ERR_UUID, "uuid error" },
- { GOT_ERR_LOCKFILE_TIMEOUT,"lockfile timeout" },
- { GOT_ERR_BAD_REF_NAME, "bad reference name" },
- { GOT_ERR_WORKTREE_REPO,"cannot create worktree inside a git repository" },
- { GOT_ERR_FILE_MODIFIED,"file contains modifications" },
- { GOT_ERR_FILE_STATUS, "file has unexpected status" },
- { GOT_ERR_COMMIT_CONFLICT,"cannot commit file in conflicted status" },
- { GOT_ERR_BAD_REF_TYPE, "bad reference type" },
- { GOT_ERR_COMMIT_NO_AUTHOR,"GOT_AUTHOR environment variable is not set" },
- { GOT_ERR_COMMIT_HEAD_CHANGED, "branch head in repository has changed "
- "while commit was in progress" },
- { GOT_ERR_COMMIT_OUT_OF_DATE, "work tree must be updated before these "
- "changes can be committed" },
- { GOT_ERR_COMMIT_MSG_EMPTY, "commit message cannot be empty" },
- { GOT_ERR_DIR_NOT_EMPTY, "directory exists and is not empty" },
- { GOT_ERR_COMMIT_NO_CHANGES, "no changes to commit" },
- { GOT_ERR_BRANCH_MOVED, "work tree's head reference now points to a "
- "different branch; new head reference and/or update -b required" },
- { GOT_ERR_OBJ_TOO_LARGE, "object too large" },
- { GOT_ERR_SAME_BRANCH, "commit is already contained in this branch" },
- { GOT_ERR_ROOT_COMMIT, "specified commit has no parent commit" },
- { GOT_ERR_MIXED_COMMITS,"work tree contains files from multiple "
- "base commits; the entire work tree must be updated first" },
- { GOT_ERR_CONFLICTS, "work tree contains conflicted files; these "
- "conflicts must be resolved first" },
- { GOT_ERR_BRANCH_EXISTS,"specified branch already exists" },
- { GOT_ERR_MODIFIED, "work tree contains local changes; these "
- "changes must be committed or reverted first" },
- { GOT_ERR_NOT_REBASING, "rebase operation not in progress" },
- { GOT_ERR_EMPTY_REBASE, "no commits to rebase" },
- { GOT_ERR_REBASE_COMMITID,"rebase commit ID mismatch" },
- { GOT_ERR_REBASING, "a rebase operation is in progress in this "
- "work tree and must be continued or aborted first" },
- { GOT_ERR_REBASE_PATH, "cannot rebase branch which contains "
- "changes outside of this work tree's path prefix" },
- { GOT_ERR_NOT_HISTEDIT, "histedit operation not in progress" },
- { GOT_ERR_EMPTY_HISTEDIT,"no commits to edit; perhaps the work tree "
- "must be updated to an older commit first" },
- { GOT_ERR_NO_HISTEDIT_CMD,"no histedit commands provided" },
- { GOT_ERR_HISTEDIT_SYNTAX,"syntax error in histedit command list" },
- { GOT_ERR_HISTEDIT_CANCEL,"histedit operation cancelled" },
- { 95, "unused error code" },
- { GOT_ERR_HISTEDIT_BUSY,"histedit operation is in progress in this "
- "work tree and must be continued or aborted first" },
- { GOT_ERR_HISTEDIT_CMD, "bad histedit command" },
- { GOT_ERR_HISTEDIT_PATH, "cannot edit branch history which contains "
- "changes outside of this work tree's path prefix" },
- { 99, "unused error code" },
- { GOT_ERR_COMMIT_BRANCH, "will not commit to a branch outside the "
- "\"refs/heads/\" reference namespace" },
- { GOT_ERR_FILE_STAGED, "file is staged" },
- { GOT_ERR_STAGE_NO_CHANGE, "no changes to stage" },
- { GOT_ERR_STAGE_CONFLICT, "cannot stage file in conflicted status" },
- { GOT_ERR_STAGE_OUT_OF_DATE, "work tree must be updated before "
- "changes can be staged" },
- { GOT_ERR_FILE_NOT_STAGED, "file is not staged" },
- { GOT_ERR_STAGED_PATHS, "work tree contains files with staged "
- "changes; these changes must be committed or unstaged first" },
- { GOT_ERR_PATCH_CHOICE, "invalid patch choice" },
- { GOT_ERR_COMMIT_NO_EMAIL, "commit author's email address is required "
- "for compatibility with Git" },
- { GOT_ERR_TAG_EXISTS,"specified tag already exists" },
- { GOT_ERR_GIT_REPO_FORMAT,"unknown git repository format version" },
- { GOT_ERR_REBASE_REQUIRED,"specified branch must be rebased first" },
- { GOT_ERR_REGEX, "regular expression error" },
- { GOT_ERR_REF_NAME_MINUS, "reference name may not start with '-'" },
- { GOT_ERR_GITCONFIG_SYNTAX, "gitconfig syntax error" },
- { GOT_ERR_REBASE_OUT_OF_DATE, "work tree must be updated before it "
- "can be used to rebase a branch" },
- { GOT_ERR_CACHE_DUP_ENTRY, "duplicate cache entry" },
- { GOT_ERR_QUERYSTRING, "bad querystring" },
- { GOT_ERR_FETCH_FAILED, "fetch failed" },
- { GOT_ERR_PARSE_URI, "failed to parse uri" },
- { GOT_ERR_BAD_PROTO, "unknown protocol" },
- { GOT_ERR_ADDRINFO, "getaddrinfo failed" },
- { GOT_ERR_BAD_PACKET, "bad packet received" },
- { GOT_ERR_NO_REMOTE, "remote repository not found" },
- { GOT_ERR_FETCH_NO_BRANCH, "could not find any branches to fetch" },
- { GOT_ERR_FETCH_BAD_REF, "reference cannot be fetched" },
- { GOT_ERR_TREE_ENTRY_TYPE, "unexpected tree entry type" },
- { GOT_ERR_PARSE_CONFIG, "configuration file syntax error" },
- { GOT_ERR_NO_CONFIG_FILE, "configuration file doesn't exit" },
- { GOT_ERR_BAD_SYMLINK, "symbolic link points outside of paths under "
- "version control" },
- { GOT_ERR_GIT_REPO_EXT, "unsupported repository format extension" },
- { GOT_ERR_CANNOT_PACK, "not enough objects to pack" },
- { GOT_ERR_LONELY_PACKIDX, "pack index has no corresponding pack file; "
- "pack file must be restored or 'gotadmin cleanup -p' must be run" },
- { GOT_ERR_OBJ_CSUM, "bad object checksum" },
- { GOT_ERR_SEND_BAD_REF, "reference cannot be sent" },
- { GOT_ERR_SEND_FAILED, "could not send pack file" },
- { GOT_ERR_SEND_EMPTY, "no references to send" },
- { GOT_ERR_SEND_ANCESTRY, "fetch and rebase required" },
- { GOT_ERR_CAPA_DELETE_REFS, "server cannot delete references" },
- { GOT_ERR_SEND_DELETE_REF, "reference cannot be deleted" },
- { GOT_ERR_SEND_TAG_EXISTS, "tag already exists on server" },
- { GOT_ERR_NOT_MERGING, "merge operation not in progress" },
- { GOT_ERR_MERGE_OUT_OF_DATE, "work tree must be updated before it "
- "can be used to merge a branch" },
- { GOT_ERR_MERGE_STAGED_PATHS, "work tree contains files with staged "
- "changes; these changes must be unstaged before merging can "
- "proceed" },
- { GOT_ERR_MERGE_COMMIT_OUT_OF_DATE, "merging cannot proceed because "
- "the work tree is no longer up-to-date; merge must be aborted "
- "and retried" },
- { GOT_ERR_MERGE_BUSY,"a merge operation is in progress in this "
- "work tree and must be continued or aborted first" },
- { GOT_ERR_MERGE_PATH, "cannot merge branch which contains "
- "changes outside of this work tree's path prefix" },
- { GOT_ERR_FILE_BINARY, "found a binary file instead of text" },
- { GOT_ERR_PATCH_MALFORMED, "malformed patch" },
- { GOT_ERR_PATCH_TRUNCATED, "patch truncated" },
- { GOT_ERR_NO_PATCH, "no patch found" },
- { GOT_ERR_HUNK_FAILED, "hunk failed to apply" },
- { GOT_ERR_PATCH_FAILED, "patch failed to apply" },
+struct got_error {
+ int code;
+ const char *msg;
};
/*
blob - c4605e6a52912a2055108147f914f2280704e639
blob + 19d6e558696c99c50807ee4f730af001911d1f1f
--- lib/error.c
+++ lib/error.c
#define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
#endif
+static const struct got_error got_errors[] = {
+ { GOT_ERR_OK, "no error occured?!?" },
+ { GOT_ERR_ERRNO, "see errno" },
+ { GOT_ERR_NOT_GIT_REPO, "no git repository found" },
+ { GOT_ERR_BAD_FILETYPE, "bad file type" },
+ { GOT_ERR_BAD_PATH, "bad path" },
+ { GOT_ERR_NOT_REF, "no such reference found" },
+ { GOT_ERR_IO, "input/output error" },
+ { GOT_ERR_EOF, "unexpected end of file" },
+ { GOT_ERR_DECOMPRESSION,"decompression failed" },
+ { GOT_ERR_NO_SPACE, "buffer too small" },
+ { GOT_ERR_BAD_OBJ_HDR, "bad object header" },
+ { GOT_ERR_OBJ_TYPE, "wrong type of object" },
+ { GOT_ERR_BAD_OBJ_DATA, "bad object data" },
+ { GOT_ERR_AMBIGUOUS_ID, "ambiguous object ID" },
+ { GOT_ERR_BAD_PACKIDX, "bad pack index file" },
+ { GOT_ERR_PACKIDX_CSUM, "pack index file checksum error" },
+ { GOT_ERR_BAD_PACKFILE, "bad pack file" },
+ { GOT_ERR_NO_OBJ, "object not found" },
+ { GOT_ERR_NOT_IMPL, "feature not implemented" },
+ { GOT_ERR_OBJ_NOT_PACKED,"object is not packed" },
+ { GOT_ERR_BAD_DELTA_CHAIN,"bad delta chain" },
+ { GOT_ERR_BAD_DELTA, "bad delta" },
+ { GOT_ERR_COMPRESSION, "compression failed" },
+ { GOT_ERR_BAD_OBJ_ID_STR,"bad object id string" },
+ { GOT_ERR_WORKTREE_EXISTS,"worktree already exists" },
+ { GOT_ERR_WORKTREE_META,"bad worktree meta data" },
+ { GOT_ERR_WORKTREE_VERS,"unsupported worktree format version" },
+ { GOT_ERR_WORKTREE_BUSY,"worktree already locked" },
+ { GOT_ERR_FILE_OBSTRUCTED,"file is obstructed" },
+ { GOT_ERR_RECURSION, "recursion limit reached" },
+ { GOT_ERR_TIMEOUT, "operation timed out" },
+ { GOT_ERR_INTERRUPT, "operation interrupted" },
+ { GOT_ERR_PRIVSEP_READ, "no data received in imsg" },
+ { GOT_ERR_PRIVSEP_LEN, "unexpected amount of data received in imsg" },
+ { GOT_ERR_PRIVSEP_PIPE, "privsep peer process closed pipe" },
+ { GOT_ERR_PRIVSEP_NO_FD,"privsep file descriptor unavailable" },
+ { GOT_ERR_PRIVSEP_MSG, "received unexpected privsep message" },
+ { GOT_ERR_PRIVSEP_DIED, "unprivileged process died unexpectedly" },
+ { GOT_ERR_PRIVSEP_EXIT, "bad exit code from unprivileged process" },
+ { GOT_ERR_PACK_OFFSET, "bad offset in pack file" },
+ { GOT_ERR_OBJ_EXISTS, "object already exists" },
+ { GOT_ERR_BAD_OBJ_ID, "bad object id" },
+ { GOT_ERR_ITER_BUSY, "iteration already in progress" },
+ { GOT_ERR_ITER_COMPLETED,"iteration completed" },
+ { GOT_ERR_RANGE, "value out of range" },
+ { GOT_ERR_EXPECTED, "expected an error but have no error" },
+ { GOT_ERR_CANCELLED, "operation in progress has been cancelled" },
+ { GOT_ERR_NO_TREE_ENTRY,"no such entry found in tree" },
+ { GOT_ERR_FILEIDX_SIG, "bad file index signature" },
+ { GOT_ERR_FILEIDX_VER, "unknown file index format version" },
+ { GOT_ERR_FILEIDX_CSUM, "bad file index checksum" },
+ { GOT_ERR_PATH_PREFIX, "worktree already contains items from a "
+ "different path prefix" },
+ { GOT_ERR_ANCESTRY, "target commit is on a different branch" },
+ { GOT_ERR_FILEIDX_BAD, "file index is corrupt" },
+ { GOT_ERR_BAD_REF_DATA, "could not parse reference data" },
+ { GOT_ERR_TREE_DUP_ENTRY,"duplicate entry in tree object" },
+ { GOT_ERR_DIR_DUP_ENTRY,"duplicate entry in directory" },
+ { GOT_ERR_NOT_WORKTREE, "no got work tree found" },
+ { GOT_ERR_UUID_VERSION, "bad uuid version" },
+ { GOT_ERR_UUID_INVALID, "uuid invalid" },
+ { GOT_ERR_UUID, "uuid error" },
+ { GOT_ERR_LOCKFILE_TIMEOUT,"lockfile timeout" },
+ { GOT_ERR_BAD_REF_NAME, "bad reference name" },
+ { GOT_ERR_WORKTREE_REPO,"cannot create worktree inside a git repository" },
+ { GOT_ERR_FILE_MODIFIED,"file contains modifications" },
+ { GOT_ERR_FILE_STATUS, "file has unexpected status" },
+ { GOT_ERR_COMMIT_CONFLICT,"cannot commit file in conflicted status" },
+ { GOT_ERR_BAD_REF_TYPE, "bad reference type" },
+ { GOT_ERR_COMMIT_NO_AUTHOR,"GOT_AUTHOR environment variable is not set" },
+ { GOT_ERR_COMMIT_HEAD_CHANGED, "branch head in repository has changed "
+ "while commit was in progress" },
+ { GOT_ERR_COMMIT_OUT_OF_DATE, "work tree must be updated before these "
+ "changes can be committed" },
+ { GOT_ERR_COMMIT_MSG_EMPTY, "commit message cannot be empty" },
+ { GOT_ERR_DIR_NOT_EMPTY, "directory exists and is not empty" },
+ { GOT_ERR_COMMIT_NO_CHANGES, "no changes to commit" },
+ { GOT_ERR_BRANCH_MOVED, "work tree's head reference now points to a "
+ "different branch; new head reference and/or update -b required" },
+ { GOT_ERR_OBJ_TOO_LARGE, "object too large" },
+ { GOT_ERR_SAME_BRANCH, "commit is already contained in this branch" },
+ { GOT_ERR_ROOT_COMMIT, "specified commit has no parent commit" },
+ { GOT_ERR_MIXED_COMMITS,"work tree contains files from multiple "
+ "base commits; the entire work tree must be updated first" },
+ { GOT_ERR_CONFLICTS, "work tree contains conflicted files; these "
+ "conflicts must be resolved first" },
+ { GOT_ERR_BRANCH_EXISTS,"specified branch already exists" },
+ { GOT_ERR_MODIFIED, "work tree contains local changes; these "
+ "changes must be committed or reverted first" },
+ { GOT_ERR_NOT_REBASING, "rebase operation not in progress" },
+ { GOT_ERR_EMPTY_REBASE, "no commits to rebase" },
+ { GOT_ERR_REBASE_COMMITID,"rebase commit ID mismatch" },
+ { GOT_ERR_REBASING, "a rebase operation is in progress in this "
+ "work tree and must be continued or aborted first" },
+ { GOT_ERR_REBASE_PATH, "cannot rebase branch which contains "
+ "changes outside of this work tree's path prefix" },
+ { GOT_ERR_NOT_HISTEDIT, "histedit operation not in progress" },
+ { GOT_ERR_EMPTY_HISTEDIT,"no commits to edit; perhaps the work tree "
+ "must be updated to an older commit first" },
+ { GOT_ERR_NO_HISTEDIT_CMD,"no histedit commands provided" },
+ { GOT_ERR_HISTEDIT_SYNTAX,"syntax error in histedit command list" },
+ { GOT_ERR_HISTEDIT_CANCEL,"histedit operation cancelled" },
+ { 95, "unused error code" },
+ { GOT_ERR_HISTEDIT_BUSY,"histedit operation is in progress in this "
+ "work tree and must be continued or aborted first" },
+ { GOT_ERR_HISTEDIT_CMD, "bad histedit command" },
+ { GOT_ERR_HISTEDIT_PATH, "cannot edit branch history which contains "
+ "changes outside of this work tree's path prefix" },
+ { 99, "unused error code" },
+ { GOT_ERR_COMMIT_BRANCH, "will not commit to a branch outside the "
+ "\"refs/heads/\" reference namespace" },
+ { GOT_ERR_FILE_STAGED, "file is staged" },
+ { GOT_ERR_STAGE_NO_CHANGE, "no changes to stage" },
+ { GOT_ERR_STAGE_CONFLICT, "cannot stage file in conflicted status" },
+ { GOT_ERR_STAGE_OUT_OF_DATE, "work tree must be updated before "
+ "changes can be staged" },
+ { GOT_ERR_FILE_NOT_STAGED, "file is not staged" },
+ { GOT_ERR_STAGED_PATHS, "work tree contains files with staged "
+ "changes; these changes must be committed or unstaged first" },
+ { GOT_ERR_PATCH_CHOICE, "invalid patch choice" },
+ { GOT_ERR_COMMIT_NO_EMAIL, "commit author's email address is required "
+ "for compatibility with Git" },
+ { GOT_ERR_TAG_EXISTS,"specified tag already exists" },
+ { GOT_ERR_GIT_REPO_FORMAT,"unknown git repository format version" },
+ { GOT_ERR_REBASE_REQUIRED,"specified branch must be rebased first" },
+ { GOT_ERR_REGEX, "regular expression error" },
+ { GOT_ERR_REF_NAME_MINUS, "reference name may not start with '-'" },
+ { GOT_ERR_GITCONFIG_SYNTAX, "gitconfig syntax error" },
+ { GOT_ERR_REBASE_OUT_OF_DATE, "work tree must be updated before it "
+ "can be used to rebase a branch" },
+ { GOT_ERR_CACHE_DUP_ENTRY, "duplicate cache entry" },
+ { GOT_ERR_QUERYSTRING, "bad querystring" },
+ { GOT_ERR_FETCH_FAILED, "fetch failed" },
+ { GOT_ERR_PARSE_URI, "failed to parse uri" },
+ { GOT_ERR_BAD_PROTO, "unknown protocol" },
+ { GOT_ERR_ADDRINFO, "getaddrinfo failed" },
+ { GOT_ERR_BAD_PACKET, "bad packet received" },
+ { GOT_ERR_NO_REMOTE, "remote repository not found" },
+ { GOT_ERR_FETCH_NO_BRANCH, "could not find any branches to fetch" },
+ { GOT_ERR_FETCH_BAD_REF, "reference cannot be fetched" },
+ { GOT_ERR_TREE_ENTRY_TYPE, "unexpected tree entry type" },
+ { GOT_ERR_PARSE_CONFIG, "configuration file syntax error" },
+ { GOT_ERR_NO_CONFIG_FILE, "configuration file doesn't exit" },
+ { GOT_ERR_BAD_SYMLINK, "symbolic link points outside of paths under "
+ "version control" },
+ { GOT_ERR_GIT_REPO_EXT, "unsupported repository format extension" },
+ { GOT_ERR_CANNOT_PACK, "not enough objects to pack" },
+ { GOT_ERR_LONELY_PACKIDX, "pack index has no corresponding pack file; "
+ "pack file must be restored or 'gotadmin cleanup -p' must be run" },
+ { GOT_ERR_OBJ_CSUM, "bad object checksum" },
+ { GOT_ERR_SEND_BAD_REF, "reference cannot be sent" },
+ { GOT_ERR_SEND_FAILED, "could not send pack file" },
+ { GOT_ERR_SEND_EMPTY, "no references to send" },
+ { GOT_ERR_SEND_ANCESTRY, "fetch and rebase required" },
+ { GOT_ERR_CAPA_DELETE_REFS, "server cannot delete references" },
+ { GOT_ERR_SEND_DELETE_REF, "reference cannot be deleted" },
+ { GOT_ERR_SEND_TAG_EXISTS, "tag already exists on server" },
+ { GOT_ERR_NOT_MERGING, "merge operation not in progress" },
+ { GOT_ERR_MERGE_OUT_OF_DATE, "work tree must be updated before it "
+ "can be used to merge a branch" },
+ { GOT_ERR_MERGE_STAGED_PATHS, "work tree contains files with staged "
+ "changes; these changes must be unstaged before merging can "
+ "proceed" },
+ { GOT_ERR_MERGE_COMMIT_OUT_OF_DATE, "merging cannot proceed because "
+ "the work tree is no longer up-to-date; merge must be aborted "
+ "and retried" },
+ { GOT_ERR_MERGE_BUSY,"a merge operation is in progress in this "
+ "work tree and must be continued or aborted first" },
+ { GOT_ERR_MERGE_PATH, "cannot merge branch which contains "
+ "changes outside of this work tree's path prefix" },
+ { GOT_ERR_FILE_BINARY, "found a binary file instead of text" },
+ { GOT_ERR_PATCH_MALFORMED, "malformed patch" },
+ { GOT_ERR_PATCH_TRUNCATED, "patch truncated" },
+ { GOT_ERR_NO_PATCH, "no patch found" },
+ { GOT_ERR_HUNK_FAILED, "hunk failed to apply" },
+ { GOT_ERR_PATCH_FAILED, "patch failed to apply" },
+};
+
static struct got_custom_error {
struct got_error err;
char msg[4080];