summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-09-25 14:47:32 -0700
committerBen Straub <bs@github.com>2013-09-25 14:47:32 -0700
commit41dd999d12946ca2085ad315e9c5e8e57cc4e4f6 (patch)
tree0f9b3f7beefa40809a913e1e215b75dfe5a87115 /examples
parentf7db1b6f26837b44a5cb8956c23bbbdff28ba4f7 (diff)
parentac316e743878908df762cc0ea07a71cbee5c5802 (diff)
downloadlibgit2-41dd999d12946ca2085ad315e9c5e8e57cc4e4f6.tar.gz
Merge branch 'development' into blame
Diffstat (limited to 'examples')
-rw-r--r--examples/showindex.c4
-rw-r--r--examples/status.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/showindex.c b/examples/showindex.c
index e92a9c8de..93718c89b 100644
--- a/examples/showindex.c
+++ b/examples/showindex.c
@@ -12,6 +12,8 @@ int main (int argc, char** argv)
char out[41];
out[40] = '\0';
+ git_threads_init();
+
if (argc > 1)
dir = argv[1];
if (!dir || argc > 2) {
@@ -62,6 +64,8 @@ int main (int argc, char** argv)
git_index_free(index);
git_repository_free(repo);
+ git_threads_shutdown();
+
return 0;
}
diff --git a/examples/status.c b/examples/status.c
index 689098415..0d9f55f13 100644
--- a/examples/status.c
+++ b/examples/status.c
@@ -71,7 +71,7 @@ static void show_branch(git_repository *repo, int format)
error = git_repository_head(&head, repo);
- if (error == GIT_EORPHANEDHEAD || error == GIT_ENOTFOUND)
+ if (error == GIT_EUNBORNBRANCH || error == GIT_ENOTFOUND)
branch = NULL;
else if (!error) {
branch = git_reference_name(head);