summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-03-07 00:02:55 +0100
committerVicent Martí <tanoku@gmail.com>2012-03-07 00:11:43 +0100
commitcb8a79617b15e347f26d21cedde0f2b8670c1876 (patch)
tree459706192f41bbf15496f0c9bfe2e21b16a7e70b /src/status.c
parent9d160ba85539bbc593369f597a07d42c2770dff4 (diff)
downloadlibgit2-cb8a79617b15e347f26d21cedde0f2b8670c1876.tar.gz
error-handling: Repository
This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/status.c b/src/status.c
index e80fc02c0..6315d6355 100644
--- a/src/status.c
+++ b/src/status.c
@@ -423,10 +423,8 @@ static int dirent_cb(void *state, git_buf *a)
if (git_tree_entry_type(m) == GIT_OBJ_TREE)
git_path_to_dir(&st->head_tree_relative_path);
- error = git_buf_lasterror(&st->head_tree_relative_path);
- if (error < GIT_SUCCESS)
- return git__rethrow(error, "An error occured while "
- "determining the status of '%s'", a->ptr);
+ if (git_buf_oom(&st->head_tree_relative_path))
+ return GIT_ENOMEM;
m_name = st->head_tree_relative_path.ptr;
} else