Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a080037c
Unverified
Commit
a080037c
authored
Jun 24, 2019
by
Patrick Steinhardt
Committed by
GitHub
Jun 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5137 from libgit2/ethomson/error_messages
errors: use lowercase
parents
6ffc49e1
2a4bcf63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
src/streams/socket.c
+2
-2
src/transports/auth_negotiate.c
+1
-1
src/worktree.c
+7
-7
No files found.
src/streams/socket.c
View file @
a080037c
...
@@ -138,7 +138,7 @@ static ssize_t socket_write(git_stream *stream, const char *data, size_t len, in
...
@@ -138,7 +138,7 @@ static ssize_t socket_write(git_stream *stream, const char *data, size_t len, in
errno
=
0
;
errno
=
0
;
if
((
written
=
p_send
(
st
->
s
,
data
,
len
,
flags
))
<
0
)
{
if
((
written
=
p_send
(
st
->
s
,
data
,
len
,
flags
))
<
0
)
{
net_set_error
(
"
E
rror sending data"
);
net_set_error
(
"
e
rror sending data"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -151,7 +151,7 @@ static ssize_t socket_read(git_stream *stream, void *data, size_t len)
...
@@ -151,7 +151,7 @@ static ssize_t socket_read(git_stream *stream, void *data, size_t len)
git_socket_stream
*
st
=
(
git_socket_stream
*
)
stream
;
git_socket_stream
*
st
=
(
git_socket_stream
*
)
stream
;
if
((
ret
=
p_recv
(
st
->
s
,
data
,
len
,
0
))
<
0
)
if
((
ret
=
p_recv
(
st
->
s
,
data
,
len
,
0
))
<
0
)
net_set_error
(
"
E
rror receiving socket data"
);
net_set_error
(
"
e
rror receiving socket data"
);
return
ret
;
return
ret
;
}
}
...
...
src/transports/auth_negotiate.c
View file @
a080037c
...
@@ -144,7 +144,7 @@ static int negotiate_next_token(
...
@@ -144,7 +144,7 @@ static int negotiate_next_token(
&
output_token
,
&
output_token
,
NULL
,
NULL
,
NULL
)))
{
NULL
)))
{
negotiate_err_set
(
status_major
,
status_minor
,
"
N
egotiate failure"
);
negotiate_err_set
(
status_major
,
status_minor
,
"
n
egotiate failure"
);
error
=
-
1
;
error
=
-
1
;
goto
done
;
goto
done
;
}
}
...
...
src/worktree.c
View file @
a080037c
...
@@ -238,21 +238,21 @@ int git_worktree_validate(const git_worktree *wt)
...
@@ -238,21 +238,21 @@ int git_worktree_validate(const git_worktree *wt)
if
(
!
is_worktree_dir
(
wt
->
gitdir_path
))
{
if
(
!
is_worktree_dir
(
wt
->
gitdir_path
))
{
git_error_set
(
GIT_ERROR_WORKTREE
,
git_error_set
(
GIT_ERROR_WORKTREE
,
"
W
orktree gitdir ('%s') is not valid"
,
"
w
orktree gitdir ('%s') is not valid"
,
wt
->
gitlink_path
);
wt
->
gitlink_path
);
return
GIT_ERROR
;
return
GIT_ERROR
;
}
}
if
(
wt
->
parent_path
&&
!
git_path_exists
(
wt
->
parent_path
))
{
if
(
wt
->
parent_path
&&
!
git_path_exists
(
wt
->
parent_path
))
{
git_error_set
(
GIT_ERROR_WORKTREE
,
git_error_set
(
GIT_ERROR_WORKTREE
,
"
W
orktree parent directory ('%s') does not exist "
,
"
w
orktree parent directory ('%s') does not exist "
,
wt
->
parent_path
);
wt
->
parent_path
);
return
GIT_ERROR
;
return
GIT_ERROR
;
}
}
if
(
!
git_path_exists
(
wt
->
commondir_path
))
{
if
(
!
git_path_exists
(
wt
->
commondir_path
))
{
git_error_set
(
GIT_ERROR_WORKTREE
,
git_error_set
(
GIT_ERROR_WORKTREE
,
"
W
orktree common directory ('%s') does not exist "
,
"
w
orktree common directory ('%s') does not exist "
,
wt
->
commondir_path
);
wt
->
commondir_path
);
return
GIT_ERROR
;
return
GIT_ERROR
;
}
}
...
@@ -517,7 +517,7 @@ int git_worktree_is_prunable(git_worktree *wt,
...
@@ -517,7 +517,7 @@ int git_worktree_is_prunable(git_worktree *wt,
{
{
if
(
!
reason
.
size
)
if
(
!
reason
.
size
)
git_buf_attach_notowned
(
&
reason
,
"no reason given"
,
15
);
git_buf_attach_notowned
(
&
reason
,
"no reason given"
,
15
);
git_error_set
(
GIT_ERROR_WORKTREE
,
"
N
ot pruning locked working tree: '%s'"
,
reason
.
ptr
);
git_error_set
(
GIT_ERROR_WORKTREE
,
"
n
ot pruning locked working tree: '%s'"
,
reason
.
ptr
);
git_buf_dispose
(
&
reason
);
git_buf_dispose
(
&
reason
);
return
0
;
return
0
;
...
@@ -526,7 +526,7 @@ int git_worktree_is_prunable(git_worktree *wt,
...
@@ -526,7 +526,7 @@ int git_worktree_is_prunable(git_worktree *wt,
if
((
popts
.
flags
&
GIT_WORKTREE_PRUNE_VALID
)
==
0
&&
if
((
popts
.
flags
&
GIT_WORKTREE_PRUNE_VALID
)
==
0
&&
git_worktree_validate
(
wt
)
==
0
)
git_worktree_validate
(
wt
)
==
0
)
{
{
git_error_set
(
GIT_ERROR_WORKTREE
,
"
N
ot pruning valid working tree"
);
git_error_set
(
GIT_ERROR_WORKTREE
,
"
n
ot pruning valid working tree"
);
return
0
;
return
0
;
}
}
...
@@ -558,7 +558,7 @@ int git_worktree_prune(git_worktree *wt,
...
@@ -558,7 +558,7 @@ int git_worktree_prune(git_worktree *wt,
goto
out
;
goto
out
;
if
(
!
git_path_exists
(
path
.
ptr
))
if
(
!
git_path_exists
(
path
.
ptr
))
{
{
git_error_set
(
GIT_ERROR_WORKTREE
,
"
W
orktree gitdir '%s' does not exist"
,
path
.
ptr
);
git_error_set
(
GIT_ERROR_WORKTREE
,
"
w
orktree gitdir '%s' does not exist"
,
path
.
ptr
);
err
=
-
1
;
err
=
-
1
;
goto
out
;
goto
out
;
}
}
...
@@ -578,7 +578,7 @@ int git_worktree_prune(git_worktree *wt,
...
@@ -578,7 +578,7 @@ int git_worktree_prune(git_worktree *wt,
git_buf_attach
(
&
path
,
wtpath
,
0
);
git_buf_attach
(
&
path
,
wtpath
,
0
);
if
(
!
git_path_exists
(
path
.
ptr
))
if
(
!
git_path_exists
(
path
.
ptr
))
{
{
git_error_set
(
GIT_ERROR_WORKTREE
,
"
W
orking tree '%s' does not exist"
,
path
.
ptr
);
git_error_set
(
GIT_ERROR_WORKTREE
,
"
w
orking tree '%s' does not exist"
,
path
.
ptr
);
err
=
-
1
;
err
=
-
1
;
goto
out
;
goto
out
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment