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
763b8381
Commit
763b8381
authored
Jun 07, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing rev-parse-induced Travis errors.
parent
6c08e69f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
src/revparse.c
+5
-0
tests-clar/refs/branches/listall.c
+1
-1
tests-clar/refs/revparse.c
+8
-4
No files found.
src/revparse.c
View file @
763b8381
...
...
@@ -582,6 +582,11 @@ static int revparse_global_grep(git_object **out, git_repository *repo, const ch
git_revwalk
*
walk
;
int
retcode
=
GIT_ERROR
;
if
(
!
pattern
[
0
])
{
giterr_set
(
GITERR_REGEX
,
"Empty pattern"
);
return
GIT_ERROR
;
}
if
(
!
git_revwalk_new
(
&
walk
,
repo
))
{
regex_t
preg
;
int
reg_error
;
...
...
tests-clar/refs/branches/listall.c
View file @
763b8381
...
...
@@ -72,7 +72,7 @@ void test_refs_branches_listall__retrieve_remote_symbolic_HEAD_when_present(void
cl_git_pass
(
git_branch_list
(
&
branch_list
,
repo
,
GIT_BRANCH_REMOTE
));
cl_assert_equal_i
(
2
,
branch_list
.
count
);
cl_assert_equal_i
(
3
,
branch_list
.
count
);
assert_branch_list_contains
(
&
branch_list
,
"refs/remotes/nulltoken/HEAD"
);
assert_branch_list_contains
(
&
branch_list
,
"refs/remotes/nulltoken/master"
);
}
tests-clar/refs/revparse.c
View file @
763b8381
...
...
@@ -4,6 +4,7 @@
static
git_repository
*
g_repo
;
static
git_object
*
g_obj
;
static
char
g_orig_tz
[
16
]
=
{
0
};
...
...
@@ -23,6 +24,10 @@ static void test_object(const char *spec, const char *expected_oid)
void
test_refs_revparse__initialize
(
void
)
{
char
*
tz
=
getenv
(
"TZ"
);
if
(
tz
)
strcpy
(
g_orig_tz
,
tz
);
setenv
(
"TZ"
,
"UTC"
,
1
);
g_repo
=
cl_git_sandbox_init
(
"testrepo.git"
);
}
...
...
@@ -30,6 +35,7 @@ void test_refs_revparse__cleanup(void)
{
cl_git_sandbox_cleanup
();
g_obj
=
NULL
;
setenv
(
"TZ"
,
g_orig_tz
,
1
);
}
...
...
@@ -145,10 +151,8 @@ void test_refs_revparse__date(void)
test_object
(
"HEAD@{10 years ago}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"HEAD@{1 second}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{2012-4-30 10:23:20 -0800}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"master@{2012-4-30 10:24 -0800}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{2012-4-30 16:24 -0200}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{1335806600}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"master@{1335816640}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{2012-4-30 18:24 -0800}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{2012-4-30 23:24 -0300}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
/* Core git gives a65fedf, because they don't take time zones into account. */
test_object
(
"master@{1335806640}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
...
...
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