summaryrefslogtreecommitdiff
path: root/git2.nobj.lua
blob: c17b457c9556a662339d7211d025dd821f913045 (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

basetype "git_time_t"  "integer" "0"

c_module "git2" {
-- module settings.
use_globals = false,
hide_meta_info = false, --true,

include "git2.h",

-- Error codes
export_definitions {
OK                    = "GIT_OK",
ERROR                 = "GIT_ERROR",
ENOTFOUND             = "GIT_ENOTFOUND",
EEXISTS               = "GIT_EEXISTS",
EAMBIGUOUS            = "GIT_EAMBIGUOUS",
EBUFS                 = "GIT_EBUFS",

PASSTHROUGH           = "GIT_PASSTHROUGH",
REVWALKOVER           = "GIT_REVWALKOVER",
},

-- reference types
constants {
REF_INVALID  = 0,    -- Invalid reference */
REF_OID      = 1,    -- A reference which points at an object id */
REF_SYMBOLIC = 2,    -- A reference which points at another reference */
REF_PACKED   = 4,
REF_HAS_PEEL = 8,
REF_LISTALL  = 0x07, -- GIT_REF_OID|GIT_REF_SYMBOLIC|GIT_REF_PACKED,
},

c_function "version" {
	var_out{ "<any>", "ver" },
	c_source[[
	int major, minor, patch;
	git_libgit2_version(&(major), &(minor), &(patch));

	/* return version as a table: { major, minor, patch } */
	lua_createtable(L, 3, 0);
	lua_pushinteger(L, major);
	lua_rawseti(L, -2, 1);
	lua_pushinteger(L, minor);
	lua_rawseti(L, -2, 2);
	lua_pushinteger(L, patch);
	lua_rawseti(L, -2, 3);
]],
},
subfiles {
"src/strarray.nobj.lua",
"src/error.nobj.lua",
"src/repository.nobj.lua",
"src/config.nobj.lua",
"src/odb_object.nobj.lua",
"src/oid.nobj.lua",
"src/oid_shorten.nobj.lua",
"src/odb.nobj.lua",
"src/odb_backend.nobj.lua",
"src/index.nobj.lua",
"src/index_entry.nobj.lua",
"src/index_entry_unmerged.nobj.lua",
"src/object.nobj.lua",
"src/blob.nobj.lua",
"src/signature.nobj.lua",
"src/commit.nobj.lua",
"src/tree.nobj.lua",
"src/tree_entry.nobj.lua",
"src/tag.nobj.lua",
"src/revwalk.nobj.lua",
"src/reference.nobj.lua",
},
}