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
0f938c6b
Commit
0f938c6b
authored
May 07, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix win32 type warnings
parent
33665410
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
src/remote.c
+1
-1
tests-clar/merge/trees/trivial.c
+1
-1
tests-clar/network/remote/remotes.c
+6
-6
tests-clar/object/cache.c
+2
-2
No files found.
src/remote.c
View file @
0f938c6b
...
...
@@ -292,7 +292,7 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
git_buf_clear
(
&
buf
);
git_buf_printf
(
&
buf
,
"remote.%s.pushurl"
,
name
);
if
((
error
=
get_optional_config
(
config
,
&
buf
,
NULL
,
&
val
))
<
0
)
if
((
error
=
get_optional_config
(
config
,
&
buf
,
NULL
,
(
void
*
)
&
val
))
<
0
)
goto
cleanup
;
if
(
val
)
{
...
...
tests-clar/merge/trees/trivial.c
View file @
0f938c6b
...
...
@@ -67,7 +67,7 @@ static int merge_trivial(git_index **index, const char *ours, const char *theirs
static
int
merge_trivial_conflict_entrycount
(
git_index
*
index
)
{
const
git_index_entry
*
entry
;
size_
t
count
=
0
;
in
t
count
=
0
;
size_t
i
;
for
(
i
=
0
;
i
<
git_index_entrycount
(
index
);
i
++
)
{
...
...
tests-clar/network/remote/remotes.c
View file @
0f938c6b
...
...
@@ -118,13 +118,13 @@ void test_network_remote_remotes__add_fetchspec(void)
cl_git_pass
(
git_remote_add_fetch
(
_remote
,
"refs/*:refs/*"
));
size
++
;
cl_assert_equal_i
(
size
,
git_remote_refspec_count
(
_remote
));
cl_assert_equal_i
(
(
int
)
size
,
(
int
)
git_remote_refspec_count
(
_remote
));
_refspec
=
git_remote_get_refspec
(
_remote
,
size
-
1
);
cl_assert_equal_s
(
git_refspec_src
(
_refspec
),
"refs/*"
);
cl_assert_equal_s
(
git_refspec_dst
(
_refspec
),
"refs/*"
);
cl_assert_equal_s
(
git_refspec_string
(
_refspec
),
"refs/*:refs/*"
);
cl_assert_equal_
i
(
_refspec
->
push
,
false
);
cl_assert_equal_
b
(
_refspec
->
push
,
false
);
}
void
test_network_remote_remotes__add_pushspec
(
void
)
...
...
@@ -135,14 +135,14 @@ void test_network_remote_remotes__add_pushspec(void)
cl_git_pass
(
git_remote_add_push
(
_remote
,
"refs/*:refs/*"
));
size
++
;
cl_assert_equal_i
(
size
,
git_remote_refspec_count
(
_remote
));
cl_assert_equal_i
(
(
int
)
size
,
(
int
)
git_remote_refspec_count
(
_remote
));
_refspec
=
git_remote_get_refspec
(
_remote
,
size
-
1
);
cl_assert_equal_s
(
git_refspec_src
(
_refspec
),
"refs/*"
);
cl_assert_equal_s
(
git_refspec_dst
(
_refspec
),
"refs/*"
);
cl_assert_equal_s
(
git_refspec_string
(
_refspec
),
"refs/*:refs/*"
);
cl_assert_equal_
i
(
_refspec
->
push
,
true
);
cl_assert_equal_
b
(
_refspec
->
push
,
true
);
}
void
test_network_remote_remotes__save
(
void
)
...
...
@@ -169,12 +169,12 @@ void test_network_remote_remotes__save(void)
cl_git_pass
(
git_remote_load
(
&
_remote
,
_repo
,
"upstream"
));
cl_git_pass
(
git_remote_get_fetch_refspecs
(
&
array
,
_remote
));
cl_assert_equal_i
(
1
,
array
.
count
);
cl_assert_equal_i
(
1
,
(
int
)
array
.
count
);
cl_assert_equal_s
(
fetch_refspec
,
array
.
strings
[
0
]);
git_strarray_free
(
&
array
);
cl_git_pass
(
git_remote_get_push_refspecs
(
&
array
,
_remote
));
cl_assert_equal_i
(
1
,
array
.
count
);
cl_assert_equal_i
(
1
,
(
int
)
array
.
count
);
cl_assert_equal_s
(
push_refspec
,
array
.
strings
[
0
]);
cl_assert_equal_s
(
git_remote_url
(
_remote
),
"git://github.com/libgit2/libgit2"
);
cl_assert_equal_s
(
git_remote_pushurl
(
_remote
),
"git://github.com/libgit2/libgit2_push"
);
...
...
tests-clar/object/cache.c
View file @
0f938c6b
...
...
@@ -80,7 +80,7 @@ void test_object_cache__cache_everything(void)
cl_assert_equal_i
(
count
+
1
,
(
int
)
git_cache_size
(
&
g_repo
->
objects
));
}
cl_assert_equal_i
(
i
,
git_cache_size
(
&
g_repo
->
objects
)
-
start
);
cl_assert_equal_i
(
i
,
(
int
)
git_cache_size
(
&
g_repo
->
objects
)
-
start
);
git_odb_free
(
odb
);
...
...
@@ -135,7 +135,7 @@ void test_object_cache__cache_no_blobs(void)
}
}
cl_assert_equal_i
(
nonblobs
,
git_cache_size
(
&
g_repo
->
objects
)
-
start
);
cl_assert_equal_i
(
nonblobs
,
(
int
)
git_cache_size
(
&
g_repo
->
objects
)
-
start
);
git_odb_free
(
odb
);
}
...
...
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