diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-05-18 01:48:50 +0200 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-05-18 01:48:50 +0200 |
commit | 904b67e69fa15b7a3246e43b3d78645ffa2331f6 (patch) | |
tree | 3be54c31248759ba27a08cef52558385116d9b19 /src/repository.c | |
parent | e172cf082e62aa421703080d0bccb7b8762c8bd4 (diff) | |
download | libgit2-breaking-changes.tar.gz |
errors: Rename error codesbreaking-changes
Diffstat (limited to 'src/repository.c')
-rw-r--r-- | src/repository.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/repository.c b/src/repository.c index 2979b446e..6ce3a560f 100644 --- a/src/repository.c +++ b/src/repository.c @@ -148,7 +148,7 @@ static int load_workdir(git_repository *repo, git_buf *parent_path) error = git_config_get_string(&worktree, config, "core.worktree"); if (!error && worktree != NULL) repo->workdir = git__strdup(worktree); - else if (error != GIT_NOTFOUND) + else if (error != GIT_ENOTFOUND) return error; else { giterr_clear(); @@ -342,7 +342,7 @@ static int find_repo( if (!git_buf_len(repo_path) && !error) { giterr_set(GITERR_REPOSITORY, "Could not find repository from '%s'", start_path); - error = GIT_NOTFOUND; + error = GIT_ENOTFOUND; } return error; @@ -403,7 +403,7 @@ int git_repository_discover( *repository_path = '\0'; if ((error = find_repo(&path, NULL, start_path, flags, ceiling_dirs)) < 0) - return error != GIT_NOTFOUND ? -1 : error; + return error != GIT_ENOTFOUND ? -1 : error; if (size < (size_t)(path.size + 1)) { giterr_set(GITERR_REPOSITORY, @@ -851,7 +851,7 @@ int git_repository_head_orphan(git_repository *repo) error = git_repository_head(&ref, repo); git_reference_free(ref); - if (error == GIT_NOTFOUND) + if (error == GIT_ENOTFOUND) return 1; if (error < 0) @@ -883,7 +883,7 @@ int git_repository_is_empty(git_repository *repo) git_reference_free(head); git_reference_free(branch); - if (error == GIT_NOTFOUND) + if (error == GIT_ENOTFOUND) return 1; if (error < 0) |