Method
GgitRepositorycreate_index_entry_for_file
Declaration [src]
GgitIndexEntry*
ggit_repository_create_index_entry_for_file (
GgitRepository* repository,
GFile* file,
GgitOId* id,
GError** error
)
Description [src]
Create a new index entry. When file
is not NULL
, the path of the returned
entry (#ggit_index_entry_get_path) is set to the path of file
relative to
the working directory of repository
. The file must reside in the working
directory of repository
. The file related
fields of the returned entry are also queried from this file (if the file exists).
If id
is not NULL
, then the id of the returned entry is set to id
(see #ggit_index_entry_get_id) which could point to a blob (for a file)
or a tree (for a directory).
Return value
Returns: | GgitIndexEntry |
A |
|
The caller of the method takes ownership of the data, and is responsible for freeing it. | |
The return value can be NULL . |