mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-06 18:52:21 +00:00
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.
This commit is contained in:
parent
a61fa4c0c7
commit
84511143fd
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user