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/diff_print.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/diff_print.c')
| -rw-r--r-- | src/diff_print.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/diff_print.c b/src/diff_print.c index fd1a186c1..5aa8a37e6 100644 --- a/src/diff_print.c +++ b/src/diff_print.c @@ -222,7 +222,7 @@ static int diff_print_one_raw( if (pi->id_strlen > id_abbrev) { giterr_set(GITERR_PATCH, - "The patch input contains %d id characters (cannot print %d)", + "the patch input contains %d id characters (cannot print %d)", id_abbrev, pi->id_strlen); return -1; } @@ -273,7 +273,7 @@ static int diff_print_oid_range( if (delta->old_file.mode && id_strlen > delta->old_file.id_abbrev) { giterr_set(GITERR_PATCH, - "The patch input contains %d id characters (cannot print %d)", + "the patch input contains %d id characters (cannot print %d)", delta->old_file.id_abbrev, id_strlen); return -1; } @@ -281,7 +281,7 @@ static int diff_print_oid_range( if ((delta->new_file.mode && id_strlen > delta->new_file.id_abbrev)) { giterr_set(GITERR_PATCH, - "The patch input contains %d id characters (cannot print %d)", + "the patch input contains %d id characters (cannot print %d)", delta->new_file.id_abbrev, id_strlen); return -1; } @@ -680,7 +680,7 @@ int git_diff_print( print_file = diff_print_one_name_status; break; default: - giterr_set(GITERR_INVALID, "Unknown diff output format (%d)", format); + giterr_set(GITERR_INVALID, "unknown diff output format (%d)", format); return -1; } @@ -708,7 +708,7 @@ int git_diff_print_callback__to_buf( GIT_UNUSED(delta); GIT_UNUSED(hunk); if (!output) { - giterr_set(GITERR_INVALID, "Buffer pointer must be provided"); + giterr_set(GITERR_INVALID, "buffer pointer must be provided"); return -1; } |
