diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-05-01 19:16:14 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-05-01 19:16:14 -0700 |
commit | b88021463f9ca4ebffe8e2a5b15d4b09be465923 (patch) | |
tree | 41695a3f26cb9d3bc9b07461f09bdcd154056431 /src/commit.c | |
parent | 5587a9c93054643d66b022d03b975720e539cc3e (diff) | |
parent | 3aa351ea0fa0d9e8d155801cdac1e83d3b1717c1 (diff) | |
download | libgit2-b88021463f9ca4ebffe8e2a5b15d4b09be465923.tar.gz |
Merge remote-tracking branch 'carlosmn/remaining-errors' into new-error-handling
Conflicts:
src/refspec.c
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c index 25db5c07b..04f37fe16 100644 --- a/src/commit.c +++ b/src/commit.c @@ -310,8 +310,10 @@ int git_commit_parent(git_commit **parent, git_commit *commit, unsigned int n) assert(commit); parent_oid = git_vector_get(&commit->parent_oids, n); - if (parent_oid == NULL) - return git__throw(GIT_ENOTFOUND, "Parent %u does not exist", n); + if (parent_oid == NULL) { + giterr_set(GITERR_INVALID, "Parent %u does not exist", n); + return GIT_ENOTFOUND; + } return git_commit_lookup(parent, commit->object.repo, parent_oid); } |