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
7ca1584b
Commit
7ca1584b
authored
Mar 11, 2014
by
Anurag Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conforming to libgit2 coding style.
parent
46e4d82d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
8 deletions
+5
-8
.gitignore
+1
-0
CMakeLists.txt
+1
-1
src/revwalk.c
+1
-4
tests/revwalk/hidecb.c
+2
-3
No files found.
.gitignore
View file @
7ca1584b
...
...
@@ -14,6 +14,7 @@
.lock-wafbuild
.waf*
build/
buildx64/
build-amiga/
tests/tmp/
msvc/Debug/
...
...
CMakeLists.txt
View file @
7ca1584b
...
...
@@ -221,7 +221,7 @@ IF (MSVC)
# /GF - String pooling
# /MP - Parallel build
SET
(
CMAKE_C_FLAGS
"/GF /MP /nologo
${
CMAKE_C_FLAGS
}
"
)
SET
(
CMAKE_C_FLAGS
"/GF /MP /
wd4244 /wd4267 /
nologo
${
CMAKE_C_FLAGS
}
"
)
IF
(
STDCALL
)
# /Gz - stdcall calling convention
...
...
src/revwalk.c
View file @
7ca1584b
...
...
@@ -82,9 +82,7 @@ static int process_commit(git_revwalk *walk, git_commit_list_node *commit, int h
int
error
;
if
(
!
hide
&&
walk
->
hide_cb
)
{
hide
=
walk
->
hide_cb
(
&
commit
->
oid
,
walk
->
hide_cb_payload
);
}
if
(
hide
&&
mark_uninteresting
(
commit
)
<
0
)
return
-
1
;
...
...
@@ -585,8 +583,7 @@ int git_revwalk_add_hide_cb(
if
(
walk
->
walking
)
git_revwalk_reset
(
walk
);
if
(
walk
->
hide_cb
)
{
if
(
walk
->
hide_cb
)
{
/* There is already a callback added */
giterr_set
(
GITERR_INVALID
,
"There is already a callback added to hide commits in revision walker."
);
return
-
1
;
...
...
tests/revwalk/hidecb.c
View file @
7ca1584b
...
...
@@ -35,9 +35,7 @@ void test_revwalk_hidecb__initialize(void)
cl_git_pass
(
git_oid_fromstr
(
&
_head_id
,
commit_head
));
for
(
i
=
0
;
i
<
commit_count
;
i
++
)
{
cl_git_pass
(
git_oid_fromstr
(
&
commit_ids
[
i
],
commit_strs
[
i
]));
}
}
...
...
@@ -73,7 +71,7 @@ static int hide_commit_cb(const git_oid *commit_id, void *data)
static
int
hide_commit_use_payload_cb
(
const
git_oid
*
commit_id
,
void
*
data
)
{
git_oid
*
hide_commit_id
=
data
;
if
(
0
==
git_oid_cmp
(
commit_id
,
hide_commit_id
)
)
if
(
git_oid_cmp
(
commit_id
,
hide_commit_id
)
==
0
)
return
1
;
else
return
0
;
...
...
@@ -197,3 +195,4 @@ void test_revwalk_hidecb__test_payload(void)
git_revwalk_free
(
walk
);
}
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