Skip to content

Commit 2a4bcf6

Browse files
committed
errors: use lowercase
Use lowercase for our error messages, per our custom.
1 parent 4df9f3c commit 2a4bcf6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/streams/socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static ssize_t socket_write(git_stream *stream, const char *data, size_t len, in
138138
errno = 0;
139139

140140
if ((written = p_send(st->s, data, len, flags)) < 0) {
141-
net_set_error("Error sending data");
141+
net_set_error("error sending data");
142142
return -1;
143143
}
144144

@@ -151,7 +151,7 @@ static ssize_t socket_read(git_stream *stream, void *data, size_t len)
151151
git_socket_stream *st = (git_socket_stream *) stream;
152152

153153
if ((ret = p_recv(st->s, data, len, 0)) < 0)
154-
net_set_error("Error receiving socket data");
154+
net_set_error("error receiving socket data");
155155

156156
return ret;
157157
}

src/transports/auth_negotiate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int negotiate_next_token(
144144
&output_token,
145145
NULL,
146146
NULL))) {
147-
negotiate_err_set(status_major, status_minor, "Negotiate failure");
147+
negotiate_err_set(status_major, status_minor, "negotiate failure");
148148
error = -1;
149149
goto done;
150150
}

src/worktree.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,21 +238,21 @@ int git_worktree_validate(const git_worktree *wt)
238238

239239
if (!is_worktree_dir(wt->gitdir_path)) {
240240
git_error_set(GIT_ERROR_WORKTREE,
241-
"Worktree gitdir ('%s') is not valid",
241+
"worktree gitdir ('%s') is not valid",
242242
wt->gitlink_path);
243243
return GIT_ERROR;
244244
}
245245

246246
if (wt->parent_path && !git_path_exists(wt->parent_path)) {
247247
git_error_set(GIT_ERROR_WORKTREE,
248-
"Worktree parent directory ('%s') does not exist ",
248+
"worktree parent directory ('%s') does not exist ",
249249
wt->parent_path);
250250
return GIT_ERROR;
251251
}
252252

253253
if (!git_path_exists(wt->commondir_path)) {
254254
git_error_set(GIT_ERROR_WORKTREE,
255-
"Worktree common directory ('%s') does not exist ",
255+
"worktree common directory ('%s') does not exist ",
256256
wt->commondir_path);
257257
return GIT_ERROR;
258258
}
@@ -517,7 +517,7 @@ int git_worktree_is_prunable(git_worktree *wt,
517517
{
518518
if (!reason.size)
519519
git_buf_attach_notowned(&reason, "no reason given", 15);
520-
git_error_set(GIT_ERROR_WORKTREE, "Not pruning locked working tree: '%s'", reason.ptr);
520+
git_error_set(GIT_ERROR_WORKTREE, "not pruning locked working tree: '%s'", reason.ptr);
521521
git_buf_dispose(&reason);
522522

523523
return 0;
@@ -526,7 +526,7 @@ int git_worktree_is_prunable(git_worktree *wt,
526526
if ((popts.flags & GIT_WORKTREE_PRUNE_VALID) == 0 &&
527527
git_worktree_validate(wt) == 0)
528528
{
529-
git_error_set(GIT_ERROR_WORKTREE, "Not pruning valid working tree");
529+
git_error_set(GIT_ERROR_WORKTREE, "not pruning valid working tree");
530530
return 0;
531531
}
532532

@@ -558,7 +558,7 @@ int git_worktree_prune(git_worktree *wt,
558558
goto out;
559559
if (!git_path_exists(path.ptr))
560560
{
561-
git_error_set(GIT_ERROR_WORKTREE, "Worktree gitdir '%s' does not exist", path.ptr);
561+
git_error_set(GIT_ERROR_WORKTREE, "worktree gitdir '%s' does not exist", path.ptr);
562562
err = -1;
563563
goto out;
564564
}
@@ -578,7 +578,7 @@ int git_worktree_prune(git_worktree *wt,
578578
git_buf_attach(&path, wtpath, 0);
579579
if (!git_path_exists(path.ptr))
580580
{
581-
git_error_set(GIT_ERROR_WORKTREE, "Working tree '%s' does not exist", path.ptr);
581+
git_error_set(GIT_ERROR_WORKTREE, "working tree '%s' does not exist", path.ptr);
582582
err = -1;
583583
goto out;
584584
}

0 commit comments

Comments
 (0)