diff options
| author | Edward Thomson <ethomson@github.com> | 2016-12-29 12:25:15 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-12-29 12:26:03 +0000 |
| commit | 909d5494368a00809bc42f4780e86f4dd66e4422 (patch) | |
| tree | 637e98589830666f2326b37bcfcfc25dfc773b5a /src/buffer.c | |
| parent | 238b8ccd1aeec0e0d6e50c5050527a8107304bfb (diff) | |
| download | libgit2-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/buffer.c')
| -rw-r--r-- | src/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index d135ebe4a..fdb732d9e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -962,14 +962,14 @@ int git_buf_unquote(git_buf *buf) case '0': case '1': case '2': case '3': if (j == buf->size-3) { giterr_set(GITERR_INVALID, - "Truncated quoted character \\%c", ch); + "truncated quoted character \\%c", ch); return -1; } if (buf->ptr[j+1] < '0' || buf->ptr[j+1] > '7' || buf->ptr[j+2] < '0' || buf->ptr[j+2] > '7') { giterr_set(GITERR_INVALID, - "Truncated quoted character \\%c%c%c", + "truncated quoted character \\%c%c%c", buf->ptr[j], buf->ptr[j+1], buf->ptr[j+2]); return -1; } @@ -981,7 +981,7 @@ int git_buf_unquote(git_buf *buf) break; default: - giterr_set(GITERR_INVALID, "Invalid quoted character \\%c", ch); + giterr_set(GITERR_INVALID, "invalid quoted character \\%c", ch); return -1; } } @@ -995,6 +995,6 @@ int git_buf_unquote(git_buf *buf) return 0; invalid: - giterr_set(GITERR_INVALID, "Invalid quoted line"); + giterr_set(GITERR_INVALID, "invalid quoted line"); return -1; } |
