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
2d556f31
Commit
2d556f31
authored
Nov 03, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reflog: test reflog is deleted when ref is deleted
parent
db1edf91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
tests/refs/reflog/reflog.c
+18
-0
No files found.
tests/refs/reflog/reflog.c
View file @
2d556f31
...
...
@@ -125,6 +125,24 @@ void test_refs_reflog_reflog__renaming_the_reference_moves_the_reflog(void)
git_buf_free
(
&
master_log_path
);
}
void
test_refs_reflog_reflog__deleting_the_reference_deletes_the_reflog
(
void
)
{
git_reference
*
master
;
git_buf
master_log_path
=
GIT_BUF_INIT
;
git_buf_joinpath
(
&
master_log_path
,
git_repository_path
(
g_repo
),
GIT_REFLOG_DIR
);
git_buf_joinpath
(
&
master_log_path
,
git_buf_cstr
(
&
master_log_path
),
"refs/heads/master"
);
cl_assert_equal_i
(
true
,
git_path_isfile
(
git_buf_cstr
(
&
master_log_path
)));
cl_git_pass
(
git_reference_lookup
(
&
master
,
g_repo
,
"refs/heads/master"
));
cl_git_pass
(
git_reference_delete
(
master
));
git_reference_free
(
master
);
cl_assert_equal_i
(
false
,
git_path_isfile
(
git_buf_cstr
(
&
master_log_path
)));
git_buf_free
(
&
master_log_path
);
}
static
void
assert_has_reflog
(
bool
expected_result
,
const
char
*
name
)
{
cl_assert_equal_i
(
expected_result
,
git_reference_has_log
(
g_repo
,
name
));
...
...
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