summaryrefslogtreecommitdiff
path: root/docs/git2/RevWalk.luadoc
blob: c0c87942357dac1fa6be82e11c041c234131fd6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
--
-- Warning: AUTOGENERATED DOCS.
--

--- Class "RevWalk".
--
module("RevWalk")

--- Create a new RevWalk object.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_new">git_revwalk_new</a>:<p><p>This revision walker uses a custom memory pool and an internal
--  commit cache, so it is relatively expensive to allocate.<p> For maximum performance, this revision walker should be
--  reused for different walks.<p> This revision walker is *not* thread safe: it may only be
--  used to walk a repository on a single thread; however,
--  it is possible to have several revision walkers in
--  several different threads walking the same repository.
-- @param repo the repo to walk through.  Must be of type <a href="Repository.html">Repository</a>.
-- @return <a href="RevWalk.html">RevWalk</a> or <code>nil</code> on error.
-- @return Error string.
-- @name RevWalk.new
function RevWalk.new(repo)
end

--- Destroy this object (will be called by Garbage Collector).
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_free">git_revwalk_free</a>:<p><p>
-- @name RevWalk:close
function RevWalk:close()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_reset">git_revwalk_reset</a>:<p><p>This will clear all the pushed and hidden commits, and
--  leave the walker in a blank state (just like at
--  creation) ready to receive new commit pushes and
--  start a new walk.<p> The revision walk is automatically reset when a walk
--  is over.
-- @name RevWalk:reset
function RevWalk:reset()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_push">git_revwalk_push</a>:<p><p>The given OID must belong to a commit on the walked
--  repository.<p> The given commit will be used as one of the roots
--  when starting the revision walk. At least one commit
--  must be pushed the repository before a walk can
--  be started.
-- @param id Must be of type <a href="OID.html">OID</a>.
-- @return <code>true</code> if no error.
-- @return Error string.
-- @name RevWalk:push
function RevWalk:push(id)
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_hide">git_revwalk_hide</a>:<p><p>The given OID must belong to a commit on the walked
--  repository.<p> The resolved commit and all its parents will be hidden from the
--  output on the revision walk.
-- @param id Must be of type <a href="OID.html">OID</a>.
-- @return <code>true</code> if no error.
-- @return Error string.
-- @name RevWalk:hide
function RevWalk:hide(id)
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_next">git_revwalk_next</a>:<p><p>The initial call to this method is *not* blocking when
--  iterating through a repo with a time-sorting mode.<p> Iterating with Topological or inverted modes makes the initial
--  call blocking to preprocess the commit list, but this block should be
--  mostly unnoticeable on most repositories (topological preprocessing
--  times at 0.3s on the git.git repo).<p> The revision walker is reset when the walk is over.
-- @return <a href="OID.html">OID</a> or <code>nil</code> on error.
-- @return Error string.
-- @name RevWalk:next
function RevWalk:next()
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_sorting">git_revwalk_sorting</a>:<p><p>Changing the sorting mode resets the walker.
-- @param sort_mode combination of GIT_SORT_XXX flags.  Must be of type <code>integer</code>.
-- @name RevWalk:sorting
function RevWalk:sorting(sort_mode)
end

--- object method.
--
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/revwalk/git_revwalk_repository">git_revwalk_repository</a>:<p><p>
-- @return <a href="Repository.html">Repository</a>.
-- @name RevWalk:repository
function RevWalk:repository()
end