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
d5ed6348
Commit
d5ed6348
authored
May 14, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation warnings
parent
87d6138e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
src/notes.c
+1
-4
tests-clar/notes/notes.c
+4
-3
No files found.
src/notes.c
View file @
d5ed6348
...
@@ -456,7 +456,6 @@ static int process_entry_path(
...
@@ -456,7 +456,6 @@ static int process_entry_path(
void
*
payload
)
void
*
payload
)
{
{
int
i
=
0
,
j
=
0
,
error
=
-
1
,
len
;
int
i
=
0
,
j
=
0
,
error
=
-
1
,
len
;
bool
is_hex_only
=
true
;
git_oid
target_oid
;
git_oid
target_oid
;
git_buf
buf
=
GIT_BUF_INIT
;
git_buf
buf
=
GIT_BUF_INIT
;
...
@@ -510,12 +509,10 @@ int git_note_foreach(
...
@@ -510,12 +509,10 @@ int git_note_foreach(
void
*
payload
)
void
*
payload
)
{
{
int
error
=
-
1
;
int
error
=
-
1
;
unsigned
int
i
;
char
*
note
;
git_oid
tree_oid
;
git_oid
tree_oid
;
git_iterator
*
iter
=
NULL
;
git_iterator
*
iter
=
NULL
;
git_tree
*
tree
=
NULL
;
git_tree
*
tree
=
NULL
;
git_index_entry
*
item
;
const
git_index_entry
*
item
;
if
(
normalize_namespace
(
&
notes_ref
,
repo
)
<
0
)
if
(
normalize_namespace
(
&
notes_ref
,
repo
)
<
0
)
return
-
1
;
return
-
1
;
...
...
tests-clar/notes/notes.c
View file @
d5ed6348
...
@@ -72,7 +72,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object
...
@@ -72,7 +72,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object
{
{
git_oid
expected_note_oid
,
expected_target_oid
;
git_oid
expected_note_oid
,
expected_target_oid
;
int
*
count
=
(
int
*
)
payload
;
unsigned
int
*
count
=
(
unsigned
int
*
)
payload
;
cl_assert
(
*
count
<
EXPECTATIONS_COUNT
);
cl_assert
(
*
count
<
EXPECTATIONS_COUNT
);
...
@@ -108,7 +108,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object
...
@@ -108,7 +108,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object
void
test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace
(
void
)
void
test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace
(
void
)
{
{
git_oid
note_oid1
,
note_oid2
,
note_oid3
,
note_oid4
;
git_oid
note_oid1
,
note_oid2
,
note_oid3
,
note_oid4
;
int
retrieved_notes
=
0
;
unsigned
int
retrieved_notes
=
0
;
create_note
(
&
note_oid1
,
"refs/notes/i-can-see-dead-notes"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
,
"I decorate a65f
\n
"
);
create_note
(
&
note_oid1
,
"refs/notes/i-can-see-dead-notes"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
,
"I decorate a65f
\n
"
);
create_note
(
&
note_oid2
,
"refs/notes/i-can-see-dead-notes"
,
"c47800c7266a2be04c571c04d5a6614691ea99bd"
,
"I decorate c478
\n
"
);
create_note
(
&
note_oid2
,
"refs/notes/i-can-see-dead-notes"
,
"c47800c7266a2be04c571c04d5a6614691ea99bd"
,
"I decorate c478
\n
"
);
...
@@ -122,7 +122,8 @@ void test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace(void)
...
@@ -122,7 +122,8 @@ void test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace(void)
void
test_notes_notes__retrieving_a_list_of_notes_for_an_unknown_namespace_returns_ENOTFOUND
(
void
)
void
test_notes_notes__retrieving_a_list_of_notes_for_an_unknown_namespace_returns_ENOTFOUND
(
void
)
{
{
int
error
,
retrieved_notes
=
0
;
int
error
;
unsigned
int
retrieved_notes
=
0
;
error
=
git_note_foreach
(
_repo
,
"refs/notes/i-am-not"
,
note_list_cb
,
&
retrieved_notes
);
error
=
git_note_foreach
(
_repo
,
"refs/notes/i-am-not"
,
note_list_cb
,
&
retrieved_notes
);
cl_git_fail
(
error
);
cl_git_fail
(
error
);
...
...
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