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
74f880a6
Commit
74f880a6
authored
Jan 06, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1197 from nulltoken/travis/run-online-tests
travis: Include the online suite when running against Travis
parents
f9b4adbe
d01fe380
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
4 deletions
+14
-4
.travis.yml
+1
-1
CMakeLists.txt
+1
-1
src/clone.c
+1
-0
src/reset.c
+1
-2
tests-clar/checkout/tree.c
+6
-0
tests-clar/clone/nonetwork.c
+2
-0
tests-clar/config/backend.c
+2
-0
No files found.
.travis.yml
View file @
74f880a6
...
...
@@ -33,7 +33,7 @@ script:
# Run Tests
after_script
:
-
if [ -f ./libgit2_clar ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=../libgit2_clar.supp ./libgit2_clar -i
all
; else echo "Skipping valgrind"; fi
-
if [ -f ./libgit2_clar ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=../libgit2_clar.supp ./libgit2_clar -i
online
; else echo "Skipping valgrind"; fi
# Only watch the development branch
branches
:
...
...
CMakeLists.txt
View file @
74f880a6
...
...
@@ -268,7 +268,7 @@ IF (BUILD_CLAR)
ENDIF ()
ENABLE_TESTING()
ADD_TEST(libgit2_clar libgit2_clar)
ADD_TEST(libgit2_clar libgit2_clar
-ionline
)
ENDIF ()
IF (TAGS)
...
...
src/clone.c
View file @
74f880a6
...
...
@@ -333,6 +333,7 @@ static int setup_remotes_and_fetch(
}
git_remote_disconnect
(
origin
);
}
git_remote_free
(
origin
);
}
return
retcode
;
...
...
src/reset.c
View file @
74f880a6
...
...
@@ -107,8 +107,7 @@ int git_reset(
if
(
reset_type
>
GIT_RESET_SOFT
)
{
/* reset index to the target content */
if
((
error
=
git_repository_index
(
&
index
,
repo
))
<
0
||
(
error
=
git_index_read_tree
(
index
,
tree
))
<
0
||
if
((
error
=
git_index_read_tree
(
index
,
tree
))
<
0
||
(
error
=
git_index_write
(
index
))
<
0
)
goto
cleanup
;
...
...
tests-clar/checkout/tree.c
View file @
74f880a6
...
...
@@ -67,6 +67,9 @@ void test_checkout_tree__can_checkout_and_remove_directory(void)
cl_assert_equal_i
(
true
,
git_path_isfile
(
"./testrepo/ab/de/2.txt"
));
cl_assert_equal_i
(
true
,
git_path_isfile
(
"./testrepo/ab/de/fgh/1.txt"
));
git_object_free
(
g_object
);
g_object
=
NULL
;
/* Checkout brach "master" and update HEAD, so that HEAD matches the
* current working tree
*/
...
...
@@ -136,6 +139,9 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void)
opts
.
checkout_strategy
=
GIT_CHECKOUT_NONE
;
git_checkout_tree
(
g_repo
,
(
git_object
*
)
p_chomped_commit
,
&
opts
);
cl_assert_equal_i
(
false
,
git_path_isfile
(
"testrepo/readme.txt"
));
git_commit_free
(
p_master_commit
);
git_commit_free
(
p_chomped_commit
);
}
void
test_checkout_tree__can_switch_branches
(
void
)
...
...
tests-clar/clone/nonetwork.c
View file @
74f880a6
...
...
@@ -144,6 +144,8 @@ void test_clone_nonetwork__custom_autotag(void)
cl_git_pass
(
git_tag_list
(
&
tags
,
g_repo
));
cl_assert_equal_i
(
0
,
tags
.
count
);
git_strarray_free
(
&
tags
);
}
void
test_clone_nonetwork__cope_with_already_existing_directory
(
void
)
...
...
tests-clar/config/backend.c
View file @
74f880a6
...
...
@@ -18,4 +18,6 @@ void test_config_backend__checks_version(void)
cl_git_fail
(
git_config_add_backend
(
cfg
,
&
backend
,
0
,
false
));
err
=
giterr_last
();
cl_assert_equal_i
(
GITERR_INVALID
,
err
->
klass
);
git_config_free
(
cfg
);
}
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