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
c68dee2a
Commit
c68dee2a
authored
Jul 06, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revwalk: Properly mark uninteresting commits
parent
858dba58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
src/revwalk.c
+6
-8
No files found.
src/revwalk.c
View file @
c68dee2a
...
...
@@ -269,10 +269,13 @@ static void mark_uninteresting(commit_object *commit)
mark_uninteresting
(
commit
->
parents
[
i
]);
}
static
int
process_commit
(
git_revwalk
*
walk
,
commit_object
*
commit
)
static
int
process_commit
(
git_revwalk
*
walk
,
commit_object
*
commit
,
int
hide
)
{
int
error
;
if
(
hide
)
mark_uninteresting
(
commit
);
if
(
commit
->
seen
)
return
GIT_SUCCESS
;
...
...
@@ -281,9 +284,6 @@ static int process_commit(git_revwalk *walk, commit_object *commit)
if
((
error
=
commit_parse
(
walk
,
commit
))
<
GIT_SUCCESS
)
return
git__rethrow
(
error
,
"Failed to process commit"
);
if
(
commit
->
uninteresting
)
mark_uninteresting
(
commit
);
return
walk
->
enqueue
(
walk
,
commit
);
}
...
...
@@ -293,7 +293,7 @@ static int process_commit_parents(git_revwalk *walk, commit_object *commit)
int
error
=
GIT_SUCCESS
;
for
(
i
=
0
;
i
<
commit
->
out_degree
&&
error
==
GIT_SUCCESS
;
++
i
)
{
error
=
process_commit
(
walk
,
commit
->
parents
[
i
]);
error
=
process_commit
(
walk
,
commit
->
parents
[
i
]
,
commit
->
uninteresting
);
}
return
error
==
GIT_SUCCESS
?
GIT_SUCCESS
:
git__rethrow
(
error
,
"Failed to process commit parents"
);
...
...
@@ -307,9 +307,7 @@ static int push_commit(git_revwalk *walk, const git_oid *oid, int uninteresting)
if
(
commit
==
NULL
)
return
git__throw
(
GIT_ENOTFOUND
,
"Failed to push commit. Object not found"
);
commit
->
uninteresting
=
uninteresting
;
return
process_commit
(
walk
,
commit
);
return
process_commit
(
walk
,
commit
,
uninteresting
);
}
int
git_revwalk_push
(
git_revwalk
*
walk
,
const
git_oid
*
oid
)
...
...
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