We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c27d2d0 commit 1fdc232Copy full SHA for 1fdc232
docs/examples/init/index.md
@@ -248,7 +248,11 @@ Since the repo was *just* initialized, the index has an empty tree.
248
git_index_free(index);
249
```
250
251
-Now we have the empty tree's SHA-1 hash, but we need an actual `git_tree` object to create a commit.
+It's worth noting that this doesn't actually write the index to disk.
252
+There's a separate call for that: [`git_index_write`](http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_write).
253
+All this code does is use the empty index to get the SHA-1 hash of the empty tree.
254
+
255
+Okay, now we have the empty tree's SHA-1 hash, but we need an actual `git_tree` object to create a commit.
256
257
```c
258
if (git_tree_lookup(&tree, repo, &tree_id) < 0)
0 commit comments