Commit 71b84c639a516aa995026766815122214fcc4b0d

Vicent Martí 2011-09-18T19:55:48

Merge pull request #408 from schu/fixup-status Fixup status.c

diff --git a/src/status.c b/src/status.c
index 68fd306..66fe8cb 100644
--- a/src/status.c
+++ b/src/status.c
@@ -393,7 +393,8 @@ static int dirent_cb(void *state, char *a)
 		pa = ((cmpma >= 0) && (cmpai <= 0)) ? a_name : NULL;
 		pi = ((cmpmi >= 0) && (cmpai >= 0)) ? i_name : NULL;
 
-		error = determine_status(st, pm != NULL, pi != NULL, pa != NULL, m, entry, a, status_path(pm, pi, pa), path_type);
+		if((error = determine_status(st, pm != NULL, pi != NULL, pa != NULL, m, entry, a, status_path(pm, pi, pa), path_type)) < GIT_SUCCESS)
+			return git__rethrow(error, "An error occured while determining the status of '%s'", a);
 
 		if (pa != NULL)
 			return GIT_SUCCESS;
@@ -503,7 +504,7 @@ static int recurse_tree_entry(git_tree *tree, struct status_entry *e, const char
 
 	/* Retreive subtree */
 	if ((error = git_tree_lookup(&subtree, tree->object.repo, &tree_entry->oid)) < GIT_SUCCESS)
-		return git__throw(GIT_EOBJCORRUPTED, "Can't find tree object '%s'", &tree_entry->filename);
+		return git__throw(GIT_EOBJCORRUPTED, "Can't find tree object '%s'", tree_entry->filename);
 
 	error = recurse_tree_entry(subtree, e, dir_sep+1);
 	git_tree_close(subtree);
@@ -663,4 +664,4 @@ static int alphasorted_futils_direach(
 
 	git_vector_free(&entry_names);
 	return error;
-}
\ No newline at end of file
+}