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
ba1cd495
Unverified
Commit
ba1cd495
authored
Sep 28, 2018
by
Patrick Steinhardt
Committed by
GitHub
Sep 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4784 from tiennou/fix/warnings
Some warnings
parents
367f6243
be4717d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
src/path.c
+1
-1
src/streams/stransport.c
+1
-1
tests/core/path.c
+9
-0
No files found.
src/path.c
View file @
ba1cd495
...
...
@@ -1887,7 +1887,7 @@ extern int git_path_is_gitfile(const char *path, size_t pathlen, git_path_gitfil
const
char
*
file
,
*
hash
;
size_t
filelen
;
if
(
gitfile
<
0
&&
gitfile
>=
ARRAY_SIZE
(
gitfiles
))
{
if
(
!
(
gitfile
>=
GIT_PATH_GITFILE_GITIGNORE
&&
gitfile
<
ARRAY_SIZE
(
gitfiles
)
))
{
giterr_set
(
GITERR_OS
,
"invalid gitfile for path validation"
);
return
-
1
;
}
...
...
src/streams/stransport.c
View file @
ba1cd495
...
...
@@ -62,7 +62,7 @@ static int stransport_connect(git_stream *stream)
ret
=
SSLHandshake
(
st
->
ctx
);
if
(
ret
!=
errSSLServerAuthCompleted
)
{
giterr_set
(
GITERR_SSL
,
"unexpected return value from ssl handshake %d"
,
ret
);
giterr_set
(
GITERR_SSL
,
"unexpected return value from ssl handshake %d"
,
(
int
)
ret
);
return
-
1
;
}
...
...
tests/core/path.c
View file @
ba1cd495
...
...
@@ -676,3 +676,12 @@ void test_core_path__16_resolve_relative(void)
assert_common_dirlen
(
6
,
"a/b/c/foo.txt"
,
"a/b/c/d/e/bar.txt"
);
assert_common_dirlen
(
7
,
"/a/b/c/foo.txt"
,
"/a/b/c/d/e/bar.txt"
);
}
void
test_core_path__git_path_is_file
(
void
)
{
cl_git_fail
(
git_path_is_gitfile
(
"blob"
,
4
,
-
1
,
GIT_PATH_FS_HFS
));
cl_git_pass
(
git_path_is_gitfile
(
"blob"
,
4
,
GIT_PATH_GITFILE_GITIGNORE
,
GIT_PATH_FS_HFS
));
cl_git_pass
(
git_path_is_gitfile
(
"blob"
,
4
,
GIT_PATH_GITFILE_GITMODULES
,
GIT_PATH_FS_HFS
));
cl_git_pass
(
git_path_is_gitfile
(
"blob"
,
4
,
GIT_PATH_GITFILE_GITATTRIBUTES
,
GIT_PATH_FS_HFS
));
cl_git_fail
(
git_path_is_gitfile
(
"blob"
,
4
,
3
,
GIT_PATH_FS_HFS
));
}
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