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
b84f75c3
Commit
b84f75c3
authored
Jul 27, 2012
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reflog: Rename `entry_drop` to `drop`
parent
43b67d49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
include/git2/reflog.h
+1
-1
src/reflog.c
+1
-1
tests-clar/refs/reflog/drop.c
+9
-9
No files found.
include/git2/reflog.h
View file @
b84f75c3
...
...
@@ -109,7 +109,7 @@ GIT_EXTERN(const git_reflog_entry *) git_reflog_entry_byindex(git_reflog *reflog
*
* @return 0 on success or an error code.
*/
GIT_EXTERN
(
int
)
git_reflog_
entry_
drop
(
GIT_EXTERN
(
int
)
git_reflog_drop
(
git_reflog
*
reflog
,
unsigned
int
idx
,
int
rewrite_previous_entry
);
...
...
src/reflog.c
View file @
b84f75c3
...
...
@@ -439,7 +439,7 @@ char * git_reflog_entry_msg(const git_reflog_entry *entry)
return
entry
->
msg
;
}
int
git_reflog_
entry_
drop
(
int
git_reflog_drop
(
git_reflog
*
reflog
,
unsigned
int
idx
,
int
rewrite_previous_entry
)
...
...
tests-clar/refs/reflog/drop.c
View file @
b84f75c3
...
...
@@ -28,7 +28,7 @@ void test_refs_reflog_drop__cleanup(void)
void
test_refs_reflog_drop__dropping_a_non_exisiting_entry_from_the_log_returns_ENOTFOUND
(
void
)
{
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_reflog_
entry_
drop
(
g_reflog
,
entrycount
,
0
));
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_reflog_drop
(
g_reflog
,
entrycount
,
0
));
cl_assert_equal_i
(
entrycount
,
git_reflog_entrycount
(
g_reflog
));
}
...
...
@@ -37,7 +37,7 @@ void test_refs_reflog_drop__can_drop_an_entry(void)
{
cl_assert
(
entrycount
>
4
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
2
,
0
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
2
,
0
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
}
...
...
@@ -53,7 +53,7 @@ void test_refs_reflog_drop__can_drop_an_entry_and_rewrite_the_log_history(void)
before_next
=
git_reflog_entry_byindex
(
g_reflog
,
1
);
git_oid_cpy
(
&
before_next_old_oid
,
&
before_next
->
oid_old
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
2
,
1
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
2
,
1
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
after_next
=
git_reflog_entry_byindex
(
g_reflog
,
1
);
...
...
@@ -67,7 +67,7 @@ void test_refs_reflog_drop__can_drop_the_first_entry(void)
{
cl_assert
(
entrycount
>
2
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
0
,
0
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
0
,
0
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
}
...
...
@@ -77,7 +77,7 @@ void test_refs_reflog_drop__can_drop_the_last_entry(void)
cl_assert
(
entrycount
>
2
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
entrycount
-
1
,
0
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
entrycount
-
1
,
0
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
entry
=
git_reflog_entry_byindex
(
g_reflog
,
entrycount
-
2
);
...
...
@@ -90,7 +90,7 @@ void test_refs_reflog_drop__can_drop_the_last_entry_and_rewrite_the_log_history(
cl_assert
(
entrycount
>
2
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
entrycount
-
1
,
1
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
entrycount
-
1
,
1
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
entry
=
git_reflog_entry_byindex
(
g_reflog
,
entrycount
-
2
);
...
...
@@ -102,10 +102,10 @@ void test_refs_reflog_drop__can_drop_all_the_entries(void)
cl_assert
(
--
entrycount
>
0
);
do
{
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
--
entrycount
,
1
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
--
entrycount
,
1
));
}
while
(
entrycount
>
0
);
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
0
,
1
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
0
,
1
));
cl_assert_equal_i
(
0
,
git_reflog_entrycount
(
g_reflog
));
}
...
...
@@ -117,7 +117,7 @@ void test_refs_reflog_drop__can_persist_deletion_on_disk(void)
cl_assert
(
entrycount
>
2
);
cl_git_pass
(
git_reference_lookup
(
&
ref
,
g_repo
,
g_reflog
->
ref_name
));
cl_git_pass
(
git_reflog_
entry_
drop
(
g_reflog
,
entrycount
-
1
,
1
));
cl_git_pass
(
git_reflog_drop
(
g_reflog
,
entrycount
-
1
,
1
));
cl_assert_equal_i
(
entrycount
-
1
,
git_reflog_entrycount
(
g_reflog
));
cl_git_pass
(
git_reflog_write
(
g_reflog
));
...
...
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