Skip to content

Commit c4bbaee

Browse files
committed
fix objc, add python
1 parent 6323916 commit c4bbaee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

en/book/10-git-in-other-environments/chapter10.asc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ Again, here's how to read HEAD's commit message:
288288

289289
[source,objc]
290290
-----
291-
GTRepository *repo = [[GTRepository alloc] initWithURL:[NSURL fileURLWithPath:"/path/to/repo"] error:NULL];
291+
GTRepository *repo =
292+
[[GTRepository alloc] initWithURL:[NSURL fileURLWithPath: @"/path/to/repo"] error:NULL];
292293
GTReference *head = [repo headReferenceWithError:NULL];
293294
GTCommit *tip = head.resolvedTarget;
294295
NSString *message = tip.message;
@@ -315,7 +316,7 @@ As always, HEAD's commit message:
315316

316317
[source,python]
317318
----
318-
# TODO
319+
pygit2.Repository("/path/to/repo").head.resolve().get_object().message
319320
----
320321

321322

0 commit comments

Comments
 (0)