30. Tree¶
These Methods allow reading values froma git tree
for a given repository and
also helps in comparing them.
Contents
30.1. tree_entry_byid¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_tree_entry |
luagit2_oid |
luagit2_tree
: The tree in which entyr is to be looked up.luagit2_oid
: The tree entry oid which is being looked up.
- Returns corresponding
luagit2_tree_entry
or gives an error.
30.2. tree_entry_byindex¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_tree_entry |
index_number (integer) |
luagit2_tree
: The tree in which entyr is to be looked up.index_number
: The tree entry index number is being looked up in the tree .
- Returns corresponding
luagit2_tree_entry
or gives an error.
30.3. tree_entry_byname¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_tree_entry |
file_name (string) |
luagit2_tree
: The tree in which entyr is to be looked up.file_name
: The file name which is being looked up in the tree .
- Returns corresponding
luagit2_tree_entry
or gives an error.
30.4. tree_entry_bypath¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_tree_entry |
file_path (string) |
luagit2_tree
: The tree in which entyr is to be looked up.file_path
: The path for file which is being looked up in the tree .
- Returns corresponding
luagit2_tree_entry
or gives an error.
30.5. tree_entry_cmp¶
parameters | Returns |
---|---|
luagit2_tree_entry | Integer (>0, ==0 , <0) |
luagit2_tree_entry |
luagit2_tree_entry
: The first tree entry to compare.luagit2_tree_entry
: The second tree entry to compare.
- Returns an integer value corresponding to
- (>0) if entry_first > entry_second.
- (=0) if entry_first = entry_second.
- (<0) if entry_first < entry_second.
30.6. tree_entry_filemode¶
parameters | Returns |
---|---|
luagit2_tree_entry | luagit2_filemode |
luagit2_tree_entry
: The tree entry whose file mode is to be found.
- Returns corresponding
luagit2_filemode
or an error.
30.7. tree_entry_filemode_raw¶
parameters | Returns |
---|---|
luagit2_tree_entry | luagit2_filemode |
luagit2_tree_entry
: The tree entry whose file mode is to be found.
- Returns corresponding raw
luagit2_filemode
or an error.
30.8. tree_entry_id¶
parameters | Returns |
---|---|
luagit2_tree_entry | luagit2_oid |
luagit2_tree_entry
: The tree entry whose oid is to be found.
- Returns corresponding
luagit2_oid
or an error.
30.9. tree_entry_name¶
parameters | Returns |
---|---|
luagit2_tree_entry | name (string) |
luagit2_tree_entry
: The tree entry whose name is to be found.
- Returns corresponding string name or an error.
30.10. tree_entry_to_object¶
parameters | Returns |
---|---|
luagit2_repository | luagit2_object |
luagit2_tree_entry |
luagit2_repository
: The repository where to lookup for tree entry.luagit2_tree_entry
: The tree entry which is to be converted to luagit2_object.
- Returns corresponding
luagit2_object
or an error.
30.11. tree_entry_type¶
parameters | Returns |
---|---|
luagit2_repository | luagit2_otype |
luagit2_tree_entry |
luagit2_repository
: The repository where to lookup for tree entry.luagit2_tree_entry
: The tree entry whose object type is to be found.
- Returns corresponding
luagit2_otype
or an error.
30.12. tree_entrycount¶
parameters | Returns |
---|---|
luagit2_tree | entry_count(number) |
luagit2_tree
: The tree whose entry count is to be found.
- Returns numerical value of number of entries or an error.
30.13. tree_id¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_oid |
luagit2_tree
: The tree whose oid is to be found.
- Returns corresponding
luagit2_oid
or an error.
30.14. tree_lookup¶
parameters | Returns |
---|---|
luagit2_repository | luagit2_tree |
luagit2_oid |
luagit2_repository
: The repository where to lookup for tree.luagit2_oid
: The oid of tree being looked up.
- Returns corresponding
luagit2_tree
or an error.
30.15. tree_lookup_prefix¶
parameters | Returns |
---|---|
luagit2_repository | luagit2_tree |
luagit2_oid | |
length (int) |
luagit2_repository
: The repository where to lookup for tree.luagit2_oid
: The oid of tree being looked up.length
: The length of oid to be used for looking up the tree in repository.
- Returns corresponding
luagit2_tree
or an error.
30.16. tree_owner¶
parameters | Returns |
---|---|
luagit2_tree | luagit2_repository |
luagit2_tree
: The tree whose owner is to be found.
- Returns owner
luagit2_repository
or gives an error.
30.17. tree_entry_free¶
parameters | Returns |
---|---|
luagit2_tree_entry | None |
luagit2_tree_entry
: The tree entry which is to be freed.
- Returns None or gives an error
30.18. tree_free¶
parameters | Returns |
---|---|
luagit2_tree | None |
luagit2_tree
: The tree which is to be freed.
- Returns None or gives an error.