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
94412b00
Commit
94412b00
authored
Aug 10, 2014
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remote: assert what we want to happen when ther is no default branch
Assert what we already do, so as to notice changes.
parent
26bf3a53
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
tests/network/remote/defaultbranch.c
+14
-0
No files found.
tests/network/remote/defaultbranch.c
View file @
94412b00
...
...
@@ -48,3 +48,17 @@ void test_network_remote_defaultbranch__master_on_detached(void)
cl_git_pass
(
git_repository_detach_head
(
g_repo_a
,
NULL
,
NULL
));
assert_default_branch
(
"refs/heads/master"
);
}
void
test_network_remote_defaultbranch__no_default_branch
(
void
)
{
git_remote
*
remote_b
;
const
git_remote_head
**
heads
;
size_t
len
;
cl_git_pass
(
git_remote_create
(
&
remote_b
,
g_repo_b
,
"self"
,
git_repository_path
(
g_repo_b
)));
cl_git_pass
(
git_remote_connect
(
remote_b
,
GIT_DIRECTION_FETCH
));
cl_git_pass
(
git_remote_ls
(
&
heads
,
&
len
,
remote_b
));
cl_assert_equal_i
(
0
,
len
);
git_remote_free
(
remote_b
);
}
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