summaryrefslogtreecommitdiff
path: root/src/status.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/status.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/status.c')
-rw-r--r--src/status.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/status.c b/src/status.c
index e610f5fe1..6752b5625 100644
--- a/src/status.c
+++ b/src/status.c
@@ -243,13 +243,13 @@ static int status_validate_options(const git_status_options *opts)
GITERR_CHECK_VERSION(opts, GIT_STATUS_OPTIONS_VERSION, "git_status_options");
if (opts->show > GIT_STATUS_SHOW_WORKDIR_ONLY) {
- giterr_set(GITERR_INVALID, "Unknown status 'show' option");
+ giterr_set(GITERR_INVALID, "unknown status 'show' option");
return -1;
}
if ((opts->flags & GIT_STATUS_OPT_NO_REFRESH) != 0 &&
(opts->flags & GIT_STATUS_OPT_UPDATE_INDEX) != 0) {
- giterr_set(GITERR_INVALID, "Updating index from status "
+ giterr_set(GITERR_INVALID, "updating index from status "
"is not allowed when index refresh is disabled");
return -1;
}
@@ -510,13 +510,13 @@ int git_status_file(
if (error < 0 && sfi.ambiguous) {
giterr_set(GITERR_INVALID,
- "Ambiguous path '%s' given to git_status_file", sfi.expected);
+ "ambiguous path '%s' given to git_status_file", sfi.expected);
error = GIT_EAMBIGUOUS;
}
if (!error && !sfi.count) {
giterr_set(GITERR_INVALID,
- "Attempt to get status of nonexistent file '%s'", path);
+ "attempt to get status of nonexistent file '%s'", path);
error = GIT_ENOTFOUND;
}