summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-06-12 12:01:10 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2017-06-12 16:51:04 +0100
commit9d49a43c718d0749231ac54adf4b72775cc40354 (patch)
tree1d3c2d8dd079ef1d3f1a86ced357c671bd0956cb /include
parentfb3fc837c6e35075a7060d5702cf122f998d3aea (diff)
downloadlibgit2-9d49a43c718d0749231ac54adf4b72775cc40354.tar.gz
repository_item_path: return ENOTFOUND when appropriate
Disambiguate error values: return `GIT_ENOTFOUND` when the item cannot exist in the repository (perhaps because the repository is inmemory or otherwise not backed by a filesystem), return `-1` when there is a hard failure.
Diffstat (limited to 'include')
-rw-r--r--include/git2/repository.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index a396a5409..8aac0b3f7 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -433,12 +433,12 @@ typedef enum {
* item. It will thereby honor things like the repository's
* common directory, gitdir, etc. In case a file path cannot
* exist for a given item (e.g. the working directory of a bare
- * repository), an error is returned.
+ * repository), GIT_ENOTFOUND is returned.
*
* @param out Buffer to store the path at
* @param repo Repository to get path for
* @param item The repository item for which to retrieve the path
- * @return 0 on success, otherwise a negative value
+ * @return 0, GIT_ENOTFOUND if the path cannot exist or an error code
*/
GIT_EXTERN(int) git_repository_item_path(git_buf *out, git_repository *repo, git_repository_item_t item);