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
25abbc27
Commit
25abbc27
authored
Sep 17, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up some leaks in the test suite
parent
ecef28d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletions
+7
-1
src/path.c
+3
-1
tests/network/remote/remotes.c
+1
-0
tests/repo/init.c
+1
-0
tests/transport/register.c
+2
-0
No files found.
src/path.c
View file @
25abbc27
...
@@ -1088,8 +1088,10 @@ int git_path_dirload(
...
@@ -1088,8 +1088,10 @@ int git_path_dirload(
entry_path
[
path_len
]
=
'/'
;
entry_path
[
path_len
]
=
'/'
;
memcpy
(
&
entry_path
[
path_len
+
need_slash
],
de_path
,
de_len
);
memcpy
(
&
entry_path
[
path_len
+
need_slash
],
de_path
,
de_len
);
if
((
error
=
git_vector_insert
(
contents
,
entry_path
))
<
0
)
if
((
error
=
git_vector_insert
(
contents
,
entry_path
))
<
0
)
{
git__free
(
entry_path
);
break
;
break
;
}
}
}
closedir
(
dir
);
closedir
(
dir
);
...
...
tests/network/remote/remotes.c
View file @
25abbc27
...
@@ -547,6 +547,7 @@ void test_network_remote_remotes__single_branch(void)
...
@@ -547,6 +547,7 @@ void test_network_remote_remotes__single_branch(void)
}
}
cl_assert_equal_i
(
1
,
count
);
cl_assert_equal_i
(
1
,
count
);
git_strarray_free
(
&
refs
);
git_repository_free
(
repo
);
git_repository_free
(
repo
);
}
}
...
...
tests/repo/init.c
View file @
25abbc27
...
@@ -423,6 +423,7 @@ void test_repo_init__relative_gitdir_2(void)
...
@@ -423,6 +423,7 @@ void test_repo_init__relative_gitdir_2(void)
/* make the directory first, then it should succeed */
/* make the directory first, then it should succeed */
cl_git_pass
(
git_repository_init_ext
(
&
_repo
,
"root/b/my_repository"
,
&
opts
));
cl_git_pass
(
git_repository_init_ext
(
&
_repo
,
"root/b/my_repository"
,
&
opts
));
git_buf_free
(
&
full_path
);
cl_assert
(
!
git__suffixcmp
(
git_repository_workdir
(
_repo
),
"root/b/c_wd/"
));
cl_assert
(
!
git__suffixcmp
(
git_repository_workdir
(
_repo
),
"root/b/c_wd/"
));
cl_assert
(
!
git__suffixcmp
(
git_repository_path
(
_repo
),
"root/b/my_repository/"
));
cl_assert
(
!
git__suffixcmp
(
git_repository_path
(
_repo
),
"root/b/my_repository/"
));
...
...
tests/transport/register.c
View file @
25abbc27
...
@@ -47,6 +47,7 @@ void test_transport_register__custom_transport_ssh(void)
...
@@ -47,6 +47,7 @@ void test_transport_register__custom_transport_ssh(void)
cl_git_fail_with
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
),
-
1
);
cl_git_fail_with
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
),
-
1
);
#else
#else
cl_git_pass
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
));
cl_git_pass
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
));
transport
->
free
(
transport
);
#endif
#endif
cl_git_pass
(
git_transport_register
(
"ssh"
,
dummy_transport
,
NULL
));
cl_git_pass
(
git_transport_register
(
"ssh"
,
dummy_transport
,
NULL
));
...
@@ -62,5 +63,6 @@ void test_transport_register__custom_transport_ssh(void)
...
@@ -62,5 +63,6 @@ void test_transport_register__custom_transport_ssh(void)
cl_git_fail_with
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
),
-
1
);
cl_git_fail_with
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
),
-
1
);
#else
#else
cl_git_pass
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
));
cl_git_pass
(
git_transport_new
(
&
transport
,
NULL
,
"git@somehost:somepath"
));
transport
->
free
(
transport
);
#endif
#endif
}
}
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