summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-06-13 23:01:12 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-06-26 20:43:44 +0200
commit7632e2494a5b8bfea41e7fbfaa0fc324e2178932 (patch)
tree13ad0233de2726711c1c235a67590ea9b7f391bf /include/git2/errors.h
parentbe9fe679fc86a8f233b0a6fc6078894edcb8661e (diff)
downloadlibgit2-7632e2494a5b8bfea41e7fbfaa0fc324e2178932.tar.gz
Correctly handle network input
Add a parameter to git_pkt_parse_line to tell it how much data you have in your buffer. If the buffer is too short, it returns an error saying so. Adapt the git transport to use this and fix the offset calculation. Add the GIT_ESHORTBUFFER error code.
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 334b9eda..03c74e82 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -128,6 +128,9 @@ typedef enum {
/** The path pattern and string did not match */
GIT_ENOMATCH = -31,
+
+ /** The buffer is too short to satisfy the request */
+ GIT_ESHORTBUFFER = -32,
} git_error;
/**