You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- @param path Must be of type <code>string</code>.
61
+
-- @return <code>true</code> if no error.
62
+
-- @return Error string.
63
+
-- @name Index:add_bypath
64
+
function Index:add_bypath(path)
61
65
end
62
66
63
67
--- object method.
@@ -66,64 +70,39 @@ end
66
70
-- working folder and must be readable.<p> This method will fail in bare index instances.<p> This forces the file to be added to the index, not looking
67
71
-- at gitignore rules. Those rules can be evaluated through
68
72
-- the git_status APIs (in status.h) before calling this.
69
-
-- @param path filename to add. Must be of type <code>string</code>.
70
-
-- @param stage stage for the entry. Must be of type <code>integer</code>.
71
-
-- @return <code>true</code> if no error.
72
-
-- @return Error string.
73
-
-- @name Index:add
74
-
function Index:add(path, stage)
75
-
end
76
-
77
-
--- object method.
78
-
--
79
73
-- @param source_entry Must be of type <a href="IndexEntry.html">IndexEntry</a>.
80
74
-- @return <code>true</code> if no error.
81
75
-- @return Error string.
82
-
-- @name Index:add2
83
-
function Index:add2(source_entry)
84
-
end
85
-
86
-
--- object method.
87
-
--
88
-
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_append">git_index_append</a>:<p><p>A new entry will always be inserted into the index;
89
-
-- if the index already contains an entry for such
90
-
-- path, the old entry will **not** be replaced.<p> The file `path` must be relative to the repository's
91
-
-- working folder and must be readable.<p> This method will fail in bare index instances.
92
-
-- @param path filename to add. Must be of type <code>string</code>.
93
-
-- @param stage stage for the entry. Must be of type <code>integer</code>.
94
-
-- @return <code>true</code> if no error.
95
-
-- @return Error string.
96
-
-- @name Index:append
97
-
function Index:append(path, stage)
76
+
-- @name Index:add
77
+
function Index:add(source_entry)
98
78
end
99
79
100
80
--- object method.
101
81
--
102
-
-- @param source_entry Must be of type <a href="IndexEntry.html">IndexEntry</a>.
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get">git_index_get</a>:<p><p>This entry can be modified, and the changes will be written
122
-
-- back to disk on the next write() call.<p> The entry should not be freed by the caller.
123
-
-- @param n the position of the entry. Must be of type <code>integer</code>.
101
+
-- @param path Must be of type <code>string</code>.
102
+
-- @param stage Must be of type <code>integer</code>.
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get_unmerged_bypath">git_index_get_unmerged_bypath</a>:<p><p>The returned entry is read-only and should not be modified
148
-
-- of freed by the caller.
149
-
-- @param path path to search. Must be of type <code>string</code>.
125
+
-- @param path Must be of type <code>string</code>.
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_get_unmerged_byindex">git_index_get_unmerged_byindex</a>:<p><p>The returned entry is read-only and should not be modified
158
-
-- of freed by the caller.
159
-
-- @param n the position of the entry. Must be of type <code>integer</code>.
Copy file name to clipboardExpand all lines: docs/git2/Reference.luadoc
+10-42
Original file line number
Diff line number
Diff line change
@@ -17,30 +17,10 @@ module("Reference")
17
17
function Reference.lookup(repo, name)
18
18
end
19
19
20
-
--- object method.
21
-
--
22
-
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_oid">git_reference_oid</a>:<p><p>Only available if the reference is direct (i.e. not symbolic)
23
-
-- @return <a href="OID.html">OID</a>.
24
-
-- @name Reference:oid
25
-
function Reference:oid()
26
-
end
27
-
28
-
--- object method.
29
-
--
30
-
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_set_oid">git_reference_set_oid</a>:<p><p>The reference must be a direct reference, otherwise
31
-
-- this method will fail.<p> The reference will be automatically updated in
32
-
-- memory and on disk.
33
-
-- @param oid Must be of type <a href="OID.html">OID</a>.
34
-
-- @return <code>true</code> if no error.
35
-
-- @return Error string.
36
-
-- @name Reference:set_oid
37
-
function Reference:set_oid(oid)
38
-
end
39
-
40
20
--- object method.
41
21
--
42
22
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_target">git_reference_target</a>:<p><p>Only available if the reference is symbolic
43
-
-- @return <code>string</code>.
23
+
-- @return <a href="OID.html">OID</a>.
44
24
-- @name Reference:target
45
25
function Reference:target()
46
26
end
@@ -50,11 +30,12 @@ end
50
30
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_set_target">git_reference_set_target</a>:<p><p>The reference must be a symbolic reference, otherwise
51
31
-- this method will fail.<p> The reference will be automatically updated in
52
32
-- memory and on disk.
53
-
-- @param target The new target for the reference. Must be of type <code>string</code>.
54
-
-- @return <code>true</code> if no error.
33
+
-- @param oid Must be of type <a href="OID.html">OID</a>.
34
+
-- @param log_message Must be of type <code>string</code>.
35
+
-- @return <a href="Reference.html">Reference</a> or <code>nil</code> on error.
55
36
-- @return Error string.
56
37
-- @name Reference:set_target
57
-
function Reference:set_target(target)
38
+
function Reference:set_target(oid, log_message)
58
39
end
59
40
60
41
--- object method.
@@ -106,11 +87,12 @@ end
106
87
-- reflog is enabled for the repository. We only rename
107
88
-- the reflog if it exists.
108
89
-- @param new_name The new name for the reference. Must be of type <code>string</code>.
109
-
-- @param force Overwrite an existing reference. Must be of type <code>boolean</code>.
110
-
-- @return <code>true</code> if no error.
90
+
-- @param force Overwrite an existing reference. Must be of type <code>integer</code>.
91
+
-- @param log_message Must be of type <code>string</code>.
92
+
-- @return <a href="Reference.html">Reference</a> or <code>nil</code> on error.
111
93
-- @return Error string.
112
94
-- @name Reference:rename
113
-
function Reference:rename(new_name, force)
95
+
function Reference:rename(new_name, force, log_message)
114
96
end
115
97
116
98
--- object method.
@@ -123,26 +105,12 @@ end
123
105
function Reference:delete()
124
106
end
125
107
126
-
--- module function.
127
-
--
128
-
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/reference/git_reference_packall">git_reference_packall</a>:<p><p>This method will load into the cache all the loose
129
-
-- references on the repository and update the
130
-
-- `packed-refs` file with them.<p> Once the `packed-refs` file has been written properly,
131
-
-- the loose references will be removed from disk.
132
-
-- @param repo Repository where the loose refs will be packed. Must be of type <a href="Repository.html">Repository</a>.
133
-
-- @return <code>true</code> if no error.
134
-
-- @return Error string.
135
-
-- @name Reference.packall
136
-
function Reference.packall(repo)
137
-
end
138
-
139
108
--- module function.
140
109
--
141
110
-- @param repo Must be of type <a href="Repository.html">Repository</a>.
142
-
-- @param list_flags Must be of type <code>integer</code>.
143
111
-- @return <a href="StrArray.html">StrArray</a> or <code>nil</code> on error.
Copy file name to clipboardExpand all lines: docs/git2/Repository.luadoc
+4-5
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,9 @@ end
50
50
51
51
--- object method.
52
52
--
53
-
-- <p>Calls <a href="http://libgit2.github.com/libgit2/#HEAD/group/repository/git_repository_head_orphan">git_repository_head_orphan</a>:<p><p>An orphan branch is one named from HEAD but which doesn't exist in
54
-
-- the refs namespace, because it doesn't have any commit to point to.
55
53
-- @return <code>boolean</code>.
56
-
-- @name Repository:head_orphan
57
-
function Repository:head_orphan()
54
+
-- @name Repository:head_unborn
55
+
function Repository:head_unborn()
58
56
end
59
57
60
58
--- object method.
@@ -100,10 +98,11 @@ end
100
98
-- all the common workdir operations (checkout, status, index
101
99
-- manipulation, etc).
102
100
-- @param workdir The path to a working directory. Must be of type <code>string</code>.
101
+
-- @param update_gitlink Must be of type <code>integer</code>.
103
102
-- @return <code>true</code> if no error.
104
103
-- @return Error string.
105
104
-- @name Repository:set_workdir
106
-
function Repository:set_workdir(workdir)
105
+
function Repository:set_workdir(workdir, update_gitlink)
0 commit comments