Skip to content

Commit

Permalink
Pretty up tree walk
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Aug 27, 2017
1 parent 377ad96 commit f5e8237
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions base/libgit2/tree.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
treewalk(f::Function, tree::GitTree, payload=Any[], post::Bool = false)
treewalk(f::Function, tree::GitTree, payload=Any[], post::Bool=false)
Traverse the entries in `tree` and its subtrees in post or pre order.
Traverse the entries in `tree` and its subtrees in post or pre order. Preorder
means beginning at the root and then traversing the leftmost subtree (and
recursively on down through that subtree's leftmost subtrees) and moving right
through the subtrees. Postorder means beginning at the bottom of the leftmost
subtree, traversing upwards through it, then traversing the next right subtree
(again beginning at the bottom) and finally visiting the tree root last of all.
Function parameter should have following signature:
The function parameter `f` should have following signature:
(Cstring, Ptr{Void}, Ptr{Void}) -> Cint
Expand Down

0 comments on commit f5e8237

Please sign in to comment.