Skip to content

Commit 8d8b048

Browse files
committed
Merge pull request #1 from progit/correction-corrections
Small fixes
2 parents c429264 + 9a69160 commit 8d8b048

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/B-embedding-git/sections/libgit2.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int error = git_odb_new(&odb); // <1>
127127
git_odb_backend *my_backend;
128128
error = git_odb_backend_mine(&my_backend, /*…*/); // <2>
129129
130-
error = git_odb_add_backendodb, my_backend, 1); // <3>
130+
error = git_odb_add_backend(odb, my_backend, 1); // <3>
131131
132132
git_repository *repo;
133133
error = git_repository_open(&repo, "some-path");
@@ -138,8 +138,8 @@ _(Note that errors are captured, but not handled. We hope your code is better th
138138

139139
<1> Initialize an empty object database (ODB) ``frontend,'' which will act as a container for the ``backends'' which are the ones doing the real work.
140140
<2> Initialize a custom ODB backend.
141-
<3> Open a repository
142-
<4> Set the repository to use our ODB to look up objects.
141+
<3> Add the backend to the frontend.
142+
<4> Open a repository, and set it to use our ODB to look up objects.
143143

144144
But what is this `git_odb_backend_mine` thing?
145145
Well, that's the constructor for your own ODB implementation, and you can do whatever you want in there, so long as you fill in the `git_odb_backend` structure properly.

0 commit comments

Comments
 (0)