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
47261d9c
Commit
47261d9c
authored
Nov 12, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: drop unused variables
parent
83458bb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
13 deletions
+0
-13
tests-clar/refs/create.c
+0
-13
No files found.
tests-clar/refs/create.c
View file @
47261d9c
...
...
@@ -25,16 +25,11 @@ void test_refs_create__symbolic(void)
git_reference
*
new_reference
,
*
looked_up_ref
,
*
resolved_ref
;
git_repository
*
repo2
;
git_oid
id
;
git_buf
ref_path
=
GIT_BUF_INIT
;
const
char
*
new_head_tracker
=
"ANOTHER_HEAD_TRACKER"
;
git_oid_fromstr
(
&
id
,
current_master_tip
);
/* Retrieve the physical path to the symbolic ref for further cleaning */
cl_git_pass
(
git_buf_joinpath
(
&
ref_path
,
g_repo
->
path_repository
,
new_head_tracker
));
git_buf_free
(
&
ref_path
);
/* Create and write the new symbolic reference */
cl_git_pass
(
git_reference_symbolic_create
(
&
new_reference
,
g_repo
,
new_head_tracker
,
current_head_target
,
0
));
...
...
@@ -72,13 +67,11 @@ void test_refs_create__deep_symbolic(void)
// create a deep symbolic reference
git_reference
*
new_reference
,
*
looked_up_ref
,
*
resolved_ref
;
git_oid
id
;
git_buf
ref_path
=
GIT_BUF_INIT
;
const
char
*
new_head_tracker
=
"deep/rooted/tracker"
;
git_oid_fromstr
(
&
id
,
current_master_tip
);
cl_git_pass
(
git_buf_joinpath
(
&
ref_path
,
g_repo
->
path_repository
,
new_head_tracker
));
cl_git_pass
(
git_reference_symbolic_create
(
&
new_reference
,
g_repo
,
new_head_tracker
,
current_head_target
,
0
));
cl_git_pass
(
git_reference_lookup
(
&
looked_up_ref
,
g_repo
,
new_head_tracker
));
cl_git_pass
(
git_reference_resolve
(
&
resolved_ref
,
looked_up_ref
));
...
...
@@ -87,7 +80,6 @@ void test_refs_create__deep_symbolic(void)
git_reference_free
(
new_reference
);
git_reference_free
(
looked_up_ref
);
git_reference_free
(
resolved_ref
);
git_buf_free
(
&
ref_path
);
}
void
test_refs_create__oid
(
void
)
...
...
@@ -96,15 +88,11 @@ void test_refs_create__oid(void)
git_reference
*
new_reference
,
*
looked_up_ref
;
git_repository
*
repo2
;
git_oid
id
;
git_buf
ref_path
=
GIT_BUF_INIT
;
const
char
*
new_head
=
"refs/heads/new-head"
;
git_oid_fromstr
(
&
id
,
current_master_tip
);
/* Retrieve the physical path to the symbolic ref for further cleaning */
cl_git_pass
(
git_buf_joinpath
(
&
ref_path
,
g_repo
->
path_repository
,
new_head
));
/* Create and write the new object id reference */
cl_git_pass
(
git_reference_create
(
&
new_reference
,
g_repo
,
new_head
,
&
id
,
0
));
...
...
@@ -128,7 +116,6 @@ void test_refs_create__oid(void)
git_reference_free
(
new_reference
);
git_reference_free
(
looked_up_ref
);
git_buf_free
(
&
ref_path
);
}
void
test_refs_create__oid_unknown
(
void
)
...
...
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