Commit 84511143 by Carlos Martín Nieto

tree: add more correct error messages for not found

Don't use the full path, as that's not what we are asserting does not
exist, but just the subpath we were looking up.
parent a61fa4c0
......@@ -858,7 +858,7 @@ int git_tree_entry_bypath(
if (entry == NULL) {
giterr_set(GITERR_TREE,
"The path '%s' does not exist in the given tree", path);
"the path '%.*s' does not exist in the given tree", filename_len, path);
return GIT_ENOTFOUND;
}
......@@ -868,7 +868,7 @@ int git_tree_entry_bypath(
* then this entry *must* be a tree */
if (!git_tree_entry__is_tree(entry)) {
giterr_set(GITERR_TREE,
"The path '%s' does not exist in the given tree", path);
"the path '%.*s' exists but is not a tree", filename_len, path);
return GIT_ENOTFOUND;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment