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
96a289f5
Commit
96a289f5
authored
Dec 19, 2012
by
Sascha Cunz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clone-empty-test: Don't use one pointer for two things
... so we can clean up correctly.
parent
3dc0207b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
tests-clar/clone/empty.c
+7
-3
No files found.
tests-clar/clone/empty.c
View file @
96a289f5
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
static
git_clone_options
g_options
;
static
git_clone_options
g_options
;
static
git_remote
*
g_origin
;
static
git_remote
*
g_origin
;
static
git_repository
*
g_repo
;
static
git_repository
*
g_repo
;
static
git_repository
*
g_repo_cloned
;
void
test_clone_empty__initialize
(
void
)
void
test_clone_empty__initialize
(
void
)
{
{
...
@@ -29,6 +30,9 @@ void test_clone_empty__cleanup(void)
...
@@ -29,6 +30,9 @@ void test_clone_empty__cleanup(void)
static
void
cleanup_repository
(
void
*
path
)
static
void
cleanup_repository
(
void
*
path
)
{
{
cl_fixture_cleanup
((
const
char
*
)
path
);
cl_fixture_cleanup
((
const
char
*
)
path
);
git_repository_free
(
g_repo_cloned
);
g_repo_cloned
=
NULL
;
}
}
void
test_clone_empty__can_clone_an_empty_local_repo_barely
(
void
)
void
test_clone_empty__can_clone_an_empty_local_repo_barely
(
void
)
...
@@ -40,7 +44,7 @@ void test_clone_empty__can_clone_an_empty_local_repo_barely(void)
...
@@ -40,7 +44,7 @@ void test_clone_empty__can_clone_an_empty_local_repo_barely(void)
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
"./empty_bare.git"
,
GIT_REMOTE_DEFAULT_FETCH
));
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
"./empty_bare.git"
,
GIT_REMOTE_DEFAULT_FETCH
));
g_options
.
bare
=
true
;
g_options
.
bare
=
true
;
cl_git_pass
(
git_clone
(
&
g_repo
,
g_origin
,
"./empty"
,
&
g_options
));
cl_git_pass
(
git_clone
(
&
g_repo
_cloned
,
g_origin
,
"./empty"
,
&
g_options
));
}
}
void
test_clone_empty__can_clone_an_empty_local_repo
(
void
)
void
test_clone_empty__can_clone_an_empty_local_repo
(
void
)
...
@@ -51,7 +55,7 @@ void test_clone_empty__can_clone_an_empty_local_repo(void)
...
@@ -51,7 +55,7 @@ void test_clone_empty__can_clone_an_empty_local_repo(void)
g_origin
=
NULL
;
g_origin
=
NULL
;
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
"./empty_bare.git"
,
GIT_REMOTE_DEFAULT_FETCH
));
cl_git_pass
(
git_remote_new
(
&
g_origin
,
NULL
,
"origin"
,
"./empty_bare.git"
,
GIT_REMOTE_DEFAULT_FETCH
));
cl_git_pass
(
git_clone
(
&
g_repo
,
g_origin
,
"./empty"
,
&
g_options
));
cl_git_pass
(
git_clone
(
&
g_repo
_cloned
,
g_origin
,
"./empty"
,
&
g_options
));
}
}
void
test_clone_empty__can_clone_an_empty_standard_repo
(
void
)
void
test_clone_empty__can_clone_an_empty_standard_repo
(
void
)
...
@@ -66,5 +70,5 @@ void test_clone_empty__can_clone_an_empty_standard_repo(void)
...
@@ -66,5 +70,5 @@ void test_clone_empty__can_clone_an_empty_standard_repo(void)
cl_set_cleanup
(
&
cleanup_repository
,
"./empty"
);
cl_set_cleanup
(
&
cleanup_repository
,
"./empty"
);
cl_git_pass
(
git_clone
(
&
g_repo
,
g_origin
,
"./empty"
,
&
g_options
));
cl_git_pass
(
git_clone
(
&
g_repo
_cloned
,
g_origin
,
"./empty"
,
&
g_options
));
}
}
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