diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-03-12 01:49:07 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-03-17 20:51:14 +0100 |
commit | 84511143fd1ec92ee7bc8888141aa2bf2074e9f9 (patch) | |
tree | f49b79fdf8bb8328e4e7d16930b380d33f2a5fc3 /src/tree.c | |
parent | a61fa4c0c70fe2c203bf73d163f9003763520f31 (diff) | |
download | libgit2-84511143fd1ec92ee7bc8888141aa2bf2074e9f9.tar.gz |
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.
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree.c b/src/tree.c index 47ed20dbb..bdd17661b 100644 --- a/src/tree.c +++ b/src/tree.c @@ -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; } |