revwalk: make mark_unintersting use a loop#1791
Conversation
src/revwalk.c
Outdated
There was a problem hiding this comment.
This looks like the ideal case to use @arrbee's new array type.
|
I don't think the double pops are particularly ugly. Let's move this over to the |
|
Here it is with |
src/revwalk.c
Outdated
There was a problem hiding this comment.
Why doesn't pop just pop and return the value here? You can use the coma operator in the macro. :)
There was a problem hiding this comment.
Because git_vector_pop doesn't either, but if that's not good enough reason, I'll make it so.
Using a recursive function can blow the stack when dealing with long histories. Use a loop instead to limit the call chain depth. This fixes #1223.
|
Looks good to me. We don't need it for this PR, but just to make a note of it, we could at some point add a |
revwalk: make mark_unintersting use a loop
revwalk: make mark_unintersting use a loop
Using a recursive function can blow the stack when dealing with long
histories. Use a loop instead to limit the call chain depth.
This fixes #1223.
Repeating the vector pop seems a bit icky, but I'm not sure how to refactor it other than setting
itocommit->out_degreeso we skip the loop, which also seems a bit icky.