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
f2b25261
Commit
f2b25261
authored
Sep 13, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3423 from libgit2/cmn/push-tests-inline-oid
push: put the git_oid inline in the test structure
parents
e78aeefa
1af5aecb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
tests/online/push.c
+1
-1
tests/online/push_util.c
+3
-8
tests/online/push_util.h
+2
-2
No files found.
tests/online/push.c
View file @
f2b25261
...
...
@@ -299,7 +299,7 @@ static void verify_update_tips_callback(git_remote *remote, expected_ref expecte
goto
failed
;
}
if
(
git_oid_cmp
(
expected_refs
[
i
].
oid
,
tip
->
new_oid
)
!=
0
)
{
if
(
git_oid_cmp
(
expected_refs
[
i
].
oid
,
&
tip
->
new_oid
)
!=
0
)
{
git_buf_printf
(
&
msg
,
"Updated tip ID does not match expected ID"
);
failed
=
1
;
goto
failed
;
...
...
tests/online/push_util.c
View file @
f2b25261
...
...
@@ -9,8 +9,6 @@ const git_oid OID_ZERO = {{ 0 }};
void
updated_tip_free
(
updated_tip
*
t
)
{
git__free
(
t
->
name
);
git__free
(
t
->
old_oid
);
git__free
(
t
->
new_oid
);
git__free
(
t
);
}
...
...
@@ -46,14 +44,11 @@ int record_update_tips_cb(const char *refname, const git_oid *a, const git_oid *
updated_tip
*
t
;
record_callbacks_data
*
record_data
=
(
record_callbacks_data
*
)
data
;
cl_assert
(
t
=
git__
malloc
(
sizeof
(
*
t
)));
cl_assert
(
t
=
git__
calloc
(
1
,
sizeof
(
*
t
)));
cl_assert
(
t
->
name
=
git__strdup
(
refname
));
cl_assert
(
t
->
old_oid
=
git__malloc
(
sizeof
(
*
t
->
old_oid
)));
git_oid_cpy
(
t
->
old_oid
,
a
);
cl_assert
(
t
->
new_oid
=
git__malloc
(
sizeof
(
*
t
->
new_oid
)));
git_oid_cpy
(
t
->
new_oid
,
b
);
git_oid_cpy
(
&
t
->
old_oid
,
a
);
git_oid_cpy
(
&
t
->
new_oid
,
b
);
git_vector_insert
(
&
record_data
->
updated_tips
,
t
);
...
...
tests/online/push_util.h
View file @
f2b25261
...
...
@@ -16,8 +16,8 @@ extern const git_oid OID_ZERO;
typedef
struct
{
char
*
name
;
git_oid
*
old_oid
;
git_oid
*
new_oid
;
git_oid
old_oid
;
git_oid
new_oid
;
}
updated_tip
;
typedef
struct
{
...
...
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