summaryrefslogtreecommitdiff
path: root/src/delta.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-12-29 12:25:15 +0000
committerEdward Thomson <ethomson@github.com>2016-12-29 12:26:03 +0000
commit909d5494368a00809bc42f4780e86f4dd66e4422 (patch)
tree637e98589830666f2326b37bcfcfc25dfc773b5a /src/delta.c
parent238b8ccd1aeec0e0d6e50c5050527a8107304bfb (diff)
downloadlibgit2-909d5494368a00809bc42f4780e86f4dd66e4422.tar.gz
giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore: 1. Should not begin with a capital letter, 2. Should not conclude with punctuation, and 3. Should not end a sentence and begin a new one
Diffstat (limited to 'src/delta.c')
-rw-r--r--src/delta.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/delta.c b/src/delta.c
index dc45697b6..073cba7c6 100644
--- a/src/delta.c
+++ b/src/delta.c
@@ -131,7 +131,7 @@ static int lookup_index_alloc(
GITERR_CHECK_ALLOC_ADD(&index_len, index_len, hash_len);
if (!git__is_ulong(index_len)) {
- giterr_set(GITERR_NOMEMORY, "Overly large delta");
+ giterr_set(GITERR_NOMEMORY, "overly large delta");
return -1;
}
@@ -544,12 +544,12 @@ int git_delta_apply(
* base object, resulting in data corruption or segfault.
*/
if ((hdr_sz(&base_sz, &delta, delta_end) < 0) || (base_sz != base_len)) {
- giterr_set(GITERR_INVALID, "Failed to apply delta. Base size does not match given data");
+ giterr_set(GITERR_INVALID, "failed to apply delta: base size does not match given data");
return -1;
}
if (hdr_sz(&res_sz, &delta, delta_end) < 0) {
- giterr_set(GITERR_INVALID, "Failed to apply delta. Base size does not match given data");
+ giterr_set(GITERR_INVALID, "failed to apply delta: base size does not match given data");
return -1;
}
@@ -614,6 +614,6 @@ fail:
*out = NULL;
*out_len = 0;
- giterr_set(GITERR_INVALID, "Failed to apply delta");
+ giterr_set(GITERR_INVALID, "failed to apply delta");
return -1;
}