summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/general.c2
-rw-r--r--examples/showindex.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/general.c b/examples/general.c
index e001a6889..d9467f5b5 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -371,7 +371,7 @@ int main (int argc, char** argv)
// All these properties are exported publicly in the `git_index_entry` struct
ecount = git_index_entrycount(index);
for (i = 0; i < ecount; ++i) {
- git_index_entry *e = git_index_get(index, i);
+ git_index_entry *e = git_index_get_byindex(index, i);
printf("path: %s\n", e->path);
printf("mtime: %d\n", (int)e->mtime.seconds);
diff --git a/examples/showindex.c b/examples/showindex.c
index 7f2130b90..d26fbaebd 100644
--- a/examples/showindex.c
+++ b/examples/showindex.c
@@ -19,12 +19,13 @@ int main (int argc, char** argv)
ecount = git_index_entrycount(index);
for (i = 0; i < ecount; ++i) {
- git_index_entry *e = git_index_get(index, i);
+ git_index_entry *e = git_index_get_byindex(index, i);
oid = e->oid;
git_oid_fmt(out, &oid);
printf("File Path: %s\n", e->path);
+ printf(" Stage: %d\n", git_index_entry_stage(e));
printf(" Blob SHA: %s\n", out);
printf("File Size: %d\n", (int)e->file_size);
printf(" Device: %d\n", (int)e->dev);