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/push.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/push.c')
-rw-r--r-- | src/push.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/push.c b/src/push.c index b4901388b..09c234034 100644 --- a/src/push.c +++ b/src/push.c @@ -90,7 +90,7 @@ static void free_refspec(push_spec *spec) static int check_rref(char *ref) { if (git__prefixcmp(ref, "refs/")) { - giterr_set(GITERR_INVALID, "Not a valid reference '%s'", ref); + giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref); return -1; } @@ -111,7 +111,7 @@ static int check_lref(git_push *push, char *ref) giterr_set(GITERR_REFERENCE, "src refspec '%s' does not match any existing object", ref); else - giterr_set(GITERR_INVALID, "Not a valid reference '%s'", ref); + giterr_set(GITERR_INVALID, "not a valid reference '%s'", ref); return -1; } @@ -321,7 +321,7 @@ static int revwalk(git_vector *commits, git_push *push) if (!git_odb_exists(push->repo->_odb, &spec->roid)) { giterr_set(GITERR_REFERENCE, - "Cannot push because a reference that you are trying to update on the remote contains commits that are not present locally."); + "cannot push because a reference that you are trying to update on the remote contains commits that are not present locally."); error = GIT_ENONFASTFORWARD; goto on_error; } @@ -332,7 +332,7 @@ static int revwalk(git_vector *commits, git_push *push) if (error == GIT_ENOTFOUND || (!error && !git_oid_equal(&base, &spec->roid))) { giterr_set(GITERR_REFERENCE, - "Cannot push non-fastforwardable reference"); + "cannot push non-fastforwardable reference"); error = GIT_ENONFASTFORWARD; goto on_error; } @@ -553,7 +553,7 @@ static int calculate_work(git_push *push) /* This is a create or update. Local ref must exist. */ if (git_reference_name_to_id( &spec->loid, push->repo, spec->refspec.src) < 0) { - giterr_set(GITERR_REFERENCE, "No such reference '%s'", spec->refspec.src); + giterr_set(GITERR_REFERENCE, "no such reference '%s'", spec->refspec.src); return -1; } } @@ -579,7 +579,7 @@ static int do_push(git_push *push, const git_remote_callbacks *callbacks) git_transport *transport = push->remote->transport; if (!transport->push) { - giterr_set(GITERR_NET, "Remote transport doesn't support push"); + giterr_set(GITERR_NET, "remote transport doesn't support push"); error = -1; goto on_error; } |